HAMMER VFS - Fix two minor bugs.
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 6 Apr 2011 04:09:09 +0000 (21:09 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 6 Apr 2011 04:09:09 +0000 (21:09 -0700)
commitdfec479fbd286f4df35365df97174521a832ddc1
tree25705924270c2a4f2d32baa76fe964a13e48307f
parent2d5beb816b67efa1ff2c95587b78b442b1f1b249
HAMMER VFS - Fix two minor bugs.

* When downgrading a volume to read-only due to a critical HAMMER error
  also properly downgrade the VOP_OPEN/VOP_CLOSE state so the opencount
  and writecount match up.

  This should fix issues disconnecting the related disk device after
  umounting a HAMMER partition which has had a critical error.

* When adding or removing a volume to an existing HAMMER mount flush
  disk buffers before calling VOP_CLOSE() instead of after.
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer/hammer_volume.c