From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Goldwyn Rodrigues <rgoldwyn@suse.de>,
Amir Goldstein <amir73il@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Steve French <smfrench@gmail.com>,
overlayfs <linux-unionfs@vger.kernel.org>,
Anna Schumaker <Anna.Schumaker@netapp.com>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: Re: [PATCH 3/3] ovl: Use splice_with_holes in copy_up
Date: Tue, 8 May 2018 09:16:46 +1000 [thread overview]
Message-ID: <20180507231646.GK10363@dastard> (raw)
In-Reply-To: <20180507121638.GA27632@lst.de>
On Mon, May 07, 2018 at 02:16:38PM +0200, Christoph Hellwig wrote:
> On Sun, May 06, 2018 at 09:16:41AM +1000, Dave Chinner wrote:
> > > In the patchset description [0], I ask if this should be the default
> > > feature (I think it should be) and holes should be converted to zeros as
> > > a special flag.. The only argument against it could be that applications
> > > are already using this interface, so this would be a change in behavior.
> >
> > In general, we don't change the behaviour of syscalls after the
> > fact. We have flags to control behaviour, so applications that want
> > to preserve holes will just have to be changed to use that flag.
>
> copy_file_range isn't documented to either preserve or not preserve
> holes. And in fact it will preserve holes (or even create new ones)
> for any filesystem that implements it as a clone like btrfs or xfs..
Right, but that's the entire problem. And you can't even say it will
preserve holes on XFS, because that relies on a filesystem format
feature that most users currently don't have enabled. Hence it will
be sparse preserving on some XFS filesystems but not on most.
This sort of whacky undefined behaviour w.r.t. sparseness was the
reason we were given at LSFMM for cp and rsync not implementing
copy_file_range() - they could not control it according to the
user's direction. Hence my suggestion that we need flags to
specifically direct the behaviour of the syscall so that userspace
will actually use it....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-05-07 23:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 15:26 [PATCH 0/3] Holey splice! copy_file_range() with holes Goldwyn Rodrigues
2018-05-03 15:26 ` [PATCH 1/3] Perform splice in copy_file_range if in/out SB are not same Goldwyn Rodrigues
2018-05-03 15:26 ` [PATCH 2/3] copy_file_range: splice with holes Goldwyn Rodrigues
2018-05-03 15:26 ` [PATCH 3/3] ovl: Use splice_with_holes in copy_up Goldwyn Rodrigues
2018-05-03 19:57 ` Amir Goldstein
2018-05-03 22:11 ` Dave Chinner
2018-05-04 1:29 ` Goldwyn Rodrigues
2018-05-05 23:16 ` Dave Chinner
2018-05-07 12:16 ` Christoph Hellwig
2018-05-07 23:16 ` Dave Chinner [this message]
2018-05-08 4:02 ` Christoph Hellwig
2018-05-08 10:06 ` Dave Chinner
2018-05-08 16:11 ` Goldwyn Rodrigues
2018-05-08 16:24 ` Christoph Hellwig
2018-05-07 18:50 ` Andreas Dilger
2018-05-04 1:29 ` Goldwyn Rodrigues
2018-05-04 1:31 ` Goldwyn Rodrigues
2018-05-04 6:18 ` Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180507231646.GK10363@dastard \
--to=david@fromorbit.com \
--cc=Anna.Schumaker@netapp.com \
--cc=amir73il@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=rgoldwyn@suse.com \
--cc=rgoldwyn@suse.de \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).