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>
Mon, 12 Jan 2009 23:20:46 +0000 (18:20 -0500)
commit7a791b60f5defca1357f44818a5f2dfb4ac4d7c9
treee3c81d3ba0848bbecaf84b281b76c2ee0e9bfac7
parent630ccd1a8c8568b886bcf291dd2b132eeddb0fef
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