Unionfs: handle whiteouts more efficiently in filldir
authorErez Zadok <ezk@cs.sunysb.edu>
Wed, 21 Nov 2007 03:29:20 +0000 (22:29 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 13 Jan 2009 02:32:24 +0000 (21:32 -0500)
commit742746a31275f904a67f5c917a2902705701f518
treec2efdfe90b927e96ab12cbc2a9fed2f9873ca05f
parenteede55cd6496238c1b99e9dad4340073d6468935
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