From: Erez Zadok Subject: Re: [PATCH 15/41] whiteout: ext2 whiteout support Date: Mon, 30 Nov 2009 02:45:40 -0500 Message-ID: <200911300745.nAU7jecR022659@agora.fsl.cs.sunysb.edu> References: <1256152779-10054-16-git-send-email-vaurora@redhat.com> Cc: Jan Blunck , Alexander Viro , Christoph Hellwig , Andy Whitcroft , Scott James Remnant , Sandu Popa Marius , Jan Rekorajski , "J. R. Okajima" , Arnd Bergmann , Vladimir Dronnikov , Felix Fietkau , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Theodore Tso , linux-ext4@vger.kernel.org To: Valerie Aurora Return-path: In-reply-to: Your message of "Wed, 21 Oct 2009 12:19:13 PDT." <1256152779-10054-16-git-send-email-vaurora@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org In message <1256152779-10054-16-git-send-email-vaurora@redhat.com>, Valerie Aurora writes: > From: Jan Blunck > > This patch adds whiteout support to EXT2. A whiteout is an empty directory > entry (inode == 0) with the file type set to EXT2_FT_WHT. Therefore it > allocates space in directories. Due to being implemented as a filetype it is > necessary to have the EXT2_FEATURE_INCOMPAT_FILETYPE flag set. > > XXX - Whiteouts could be implemented as special symbolic links > > Signed-off-by: Jan Blunck > Signed-off-by: Valerie Aurora > Cc: Theodore Tso > Cc: linux-ext4@vger.kernel.org > --- > fs/ext2/dir.c | 96 +++++++++++++++++++++++++++++++++++++++++++++-- > fs/ext2/ext2.h | 3 + > fs/ext2/inode.c | 11 ++++- > fs/ext2/namei.c | 65 ++++++++++++++++++++++++++++++- > fs/ext2/super.c | 7 +++ > include/linux/ext2_fs.h | 4 ++ > 6 files changed, 176 insertions(+), 10 deletions(-) > > diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c > index cb8ceff..d4628c0 100644 > --- a/fs/ext2/dir.c > +++ b/fs/ext2/dir.c > @@ -219,7 +219,7 @@ static inline int ext2_match (int len, const char * const name, > { > if (len != de->name_len) > return 0; > - if (!de->inode) > + if (!de->inode && (de->file_type != EXT2_FT_WHT)) The extra parens around (de->file_type != EXT2_FT_WHT) don't hurt but are unnecessary. Ditto in a couple of other places in this patch. Erez.