xfs
[Top] [All Lists]

Re: [PATCH] xfs: don't hand out pNFS layouts for reflink inodes

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH] xfs: don't hand out pNFS layouts for reflink inodes
From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Date: Tue, 29 Mar 2016 17:08:42 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160329072128.GA14940@xxxxxx>
References: <1456936485-21940-1-git-send-email-hch@xxxxxx> <20160328195140.GB5360@xxxxxxxxxxxxxxxx> <20160329072128.GA14940@xxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Mar 29, 2016 at 09:21:28AM +0200, Christoph Hellwig wrote:
> On Mon, Mar 28, 2016 at 12:51:40PM -0700, Darrick J. Wong wrote:
> > >   /*
> > > +  * The pNFS block layout spec actually supports reflink like
> > > +  * functionality, but the Linux pNFS server doesn't implement it yet.
> > > +  */
> > > + if (!xfs_is_reflink_inode(ip))
> > > +         return -ENXIO;
> > 
> > /me isn't familiar with pNFS, but doesn't this make it so that
> > xfs_fs_map_blocks /only/ works on reflinked files?  Maybe I'm misreading the
> > comment, but it sounds to me like Linux doesn't support reflinked files over
> > pNFS and therefore we want to disable this iomapping functionality any time 
> > we
> > find a reflinked file.
> > 
> > But maybe there's a subtlety here that I'm missing?
> 
> You jsut missed me fat fingering the check :)

Fair enough, I'll integrate this patch, but with:

if (xfs_is_reflink_inode(ip))
        return -ENXIO;

> Btw, we'll need something similar to prevent swapfiles which just use
> ->bmap, but unfortunately swap just checks for the existences of method,
> so I'll probably have to do some VFS changes to properly support that.

Yes, please.  ocfs2 will gladly let you call swapon on a reflinked file,
and totally fails to CoW it properly. :)

--D

> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>