Re: [PATCH 1/2] f2fs: support RENAME_WHITEOUT

From: Jaegeuk Kim
Date: Tue May 19 2015 - 13:43:55 EST


On Tue, May 19, 2015 at 05:36:11PM +0800, Chao Yu wrote:
> Hi Jaegeuk,
>
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk@xxxxxxxxxx]
> > Sent: Tuesday, May 19, 2015 1:51 PM
> > To: Chao Yu
> > Cc: Changman Lee; linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> > Subject: Re: [PATCH 1/2] f2fs: support RENAME_WHITEOUT
> >
> > Hi Chao,
> >
> > On Mon, May 18, 2015 at 01:54:22PM +0800, Chao Yu wrote:
> > > As the description of rename in manual, RENAME_WHITEOUT is a special operation
> > > that only makes sense for overlay/union type filesystem.
> > >
> > > When performing rename with RENAME_WHITEOUT, dst will be replace with src, and
> > > meanwhile, a 'whiteout' will be create with name of src.
> > >
> > > A "whiteout" is designed to be a char device with 0,0 device number, it has
> > > specially meaning for stackable filesystem. In these filesystems, there are
> > > multiple layers exist, and only top of these can be modified. So a whiteout
> > > in top layer is used to hide a corresponding file in lower layer, as well
> > > removal of whiteout will make the file appear.
> > >
> > > Now in overlayfs, when we rename a file which is exist in lower layer, it
> > > will be copied up to upper if it is not on upper layer yet, and then rename
> > > it on upper layer, source file will be whiteouted to hide corresponding file
> > > in lower layer at the same time.
> > >
> > > So in upper layer filesystem, implementation of RENAME_WHITEOUT provide a
> > > atomic operation for stackable filesystem to support rename operation.
> > >
> > > There are multiple ways to implement RENAME_WHITEOUT in log of this commit:
> > > 7dcf5c3e4527 ("xfs: add RENAME_WHITEOUT support") which pointed out by
> > > Dave Chinner.
> > >
> > > For now, we just try to follow the way that xfs/ext4 use.
> >
> > Could you merge the two patches into one?
>
> OK.
>
> > And, after finishing xfstests, kernel reports missing inode objects.
>
> Do you mean this?
>
> BUG f2fs_inode_cache (Tainted: G B O ):
> Objects remaining in f2fs_inode_cache on kmem_cache_close()
>
> Whenever rmmod f2fs module after tests/generic/078, system report this.

Right. :)

>
> > Could you check it out?
>
> I find that the whiteout file is not be iput() after being linkated to
> an entry. After fixing this issue, no exceptional report appears again.
>
> So can you please help to test the v2 patch?

Great. Will do.

Thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/