HAMMER VFS - Minor bug (caught by assertion panic)
commitfc4b48e0e0d5fbf7799cf5b0fa8316314b785691
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 18 Oct 2010 07:49:59 +0000 (18 00:49 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 24 Oct 2010 16:31:15 +0000 (24 09:31 -0700)
tree95d71a5c747b85316d8b83a94807febbc8dcec81
parentae4b7676505eaa88b2343922423312d1cdb0cfaa
HAMMER VFS - Minor bug (caught by assertion panic)

* A snapshot can sometimes contain visible inodes whos nlinks count is 0,
  essentially the snapshot 'catches' the file in the middle of being deleted.

* HAMMER was attempting to truncate the data for such inodes if the file
  were opened and then closed, and failed to check whether the inode was a
  snapshot or a current inode.  This flowed through until it hit an assertion
  designed to detect precisely that case.

* Fixed by adding a check to determine if the inode is a snapshot and/or
  the filesystem is mounted read-only.

Repored-by: Max <herrgard@gmail.com>
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_object.c