Unionfs: handle whiteouts more efficiently in filldir
authorErez Zadok <ezk@cs.sunysb.edu>
Sun, 25 Nov 2007 23:27:27 +0000 (18:27 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 23 Mar 2008 03:49:02 +0000 (23:49 -0400)
commit36bc580921730bd618f509738e23fc7c71df2b7e
tree53be02222876bf3007bc3dacaed70b9257f89e79
parentc76f7bdf9c5fbc9f43daee9ec0914ca901df4ced
Unionfs: handle whiteouts more efficiently in filldir

If we cache a dirent for file "foo", and then it gets deleted, then we look
for a ".wh.foo" whiteout entry in the same dirent cache.  But our dirent
cache strips the ".wh." prefix, thus looking for an entry named "foo" whose
filldir_node->whiteout should be 1 instead of 0.  In that case, don't
display  an incorrect printk  message that the file system may be corrupt,
but set that filldir_node->whiteout to 1.

CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/dirfops.c
fs/unionfs/dirhelper.c
fs/unionfs/rdstate.c
fs/unionfs/union.h