linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/1] xfs: use reflink to assist unaligned copy_file_range calls
Date: Mon, 7 Dec 2020 14:20:57 +0000	[thread overview]
Message-ID: <20201207142057.GA9865@infradead.org> (raw)
In-Reply-To: <20201206232154.GK629293@magnolia>

On Sun, Dec 06, 2020 at 03:21:54PM -0800, Darrick J. Wong wrote:
> On Tue, Dec 01, 2020 at 10:02:06AM +0000, Christoph Hellwig wrote:
> > On Mon, Nov 30, 2020 at 07:37:16PM -0800, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <darrick.wong@oracle.com>
> > > 
> > > Add a copy_file_range handler to XFS so that we can accelerate file
> > > copies with reflink when the source and destination ranges are not
> > > block-aligned.  We'll use the generic pagecache copy to handle the
> > > unaligned edges and attempt to reflink the middle.
> > 
> > Isn't this something we could better handle in the VFS (or a generic
> > helper) so that all file systems that support reflink could benefit?
> 
> Maybe.  I don't know if it's universally true that all filesystems
> should fall back to reflinking the middle range and pagecache copying
> the unaligned start/end.
> 
> The other thing is that xfs can easily support reflink on rtextsize > 1,
> but that adds the requirement that we set i_blocksize to a larger value
> than we do now... or find some other way to convey allocation unit size
> to a generic version of the fallback.  OTOH that's pretty easy to do
> from xfs_copy_file_range.

I think you can basically turn xfs_want_reflink_copy_range into a
callback supplied by the fs for the generic helper, and to deal with
the rtextsize problem just return the relevant block size from the
helper.

  reply	other threads:[~2020-12-07 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  3:37 [PATCH 0/1] xfs: faster unaligned copy_file_range Darrick J. Wong
2020-12-01  3:37 ` [PATCH 1/1] xfs: use reflink to assist unaligned copy_file_range calls Darrick J. Wong
2020-12-01 10:02   ` Christoph Hellwig
2020-12-06 23:21     ` Darrick J. Wong
2020-12-07 14:20       ` Christoph Hellwig [this message]
2020-12-01 15:25   ` Brian Foster
2020-12-06 23:24     ` Darrick J. Wong
2020-12-07 14:01       ` Brian Foster

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=20201207142057.GA9865@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /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).