kernel - cycle vnode in cache_unlink()
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Feb 2013 17:57:55 +0000 (09:57 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Feb 2013 17:57:55 +0000 (09:57 -0800)
commit245d8a0dfa548142367bafba756f1dda2b822750
treec9eed0d48f25d7ae4f279a844899de809aab38e0
parent085cb1ddbf6bf775e9fcdbf09d7e0d0d44711b11
kernel - cycle vnode in cache_unlink()

* cache_unlink() and cache_rename() are called by VFS's to update the
  namecache after a file deletion or rename.  cache_rename() also calls
  cache_unlink().

* Add code to this function which cycles any vnode attached to the
  namecache entry for the case where its refs are 0.  This will
  trigger VOP_INACTIVE and allow the VFS to detect file deletions.

  Generally speaking this means that VFS's no longer have to detect
  deleted files in code paths outside of VOP_INACTIVE w/regards to
  forcing a reclaim on the vnode.

* HAMMER2 now depends on this behavior.  The change in behavior allows
  HAMMER2 to do away with inode backpointers from chain structures,
  greatly simplifying the code and removing a chicken-egg dependency.

* Other VFSs (HAMMER, TMPFS, UFS) may be adjusted in the future but for
  now their file deletion code outside of VOP_INACTIVE is being left
  intact.
sys/kern/vfs_cache.c