From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Omar Sandoval <osandov@osandov.com>,
Qu Wenruo <quwenruo@cn.fujitsu.com>,
fstests@vger.kernel.org, btrfs <linux-btrfs@vger.kernel.org>,
linux-xfs@vger.kernel.org
Subject: Re: About reflink len = 0 behavior
Date: Fri, 21 Oct 2016 03:09:11 -0700 [thread overview]
Message-ID: <20161021100911.GA22612@infradead.org> (raw)
In-Reply-To: <20161021030005.GB5257@birch.djwong.org>
On Thu, Oct 20, 2016 at 08:00:05PM -0700, Darrick J. Wong wrote:
> > > > For btrfs, dedupe will just return 0 and check nothing, while for xfs
> > > > len == 0 means to check the whole file length.
> > > >
> > > > Both makes sense for me, for btrfs len = 0 behavior, it just follows
> > > > read/write functions.
> > > > And I assume xfs follows reflink behavior, when len is not specified,
> > > > then reflink the length of src file.
>
> Yes.
>
> > > > But since it's a generic test, we need to unify the behavior.
> > > >
> > > > So, which one is the standard and which document should we follow for
> > > > such behavior definition?
>
> <shrug> I suppose since it'll stop deduping at the first non-matching range,
> there's not a lot of point in having "dedupe to wherever is the end of the
> file" feature.
>
> (Also, if he hasn't already, I'm sure Christoph will point out that we
> shouldn't really go changing the interface after the fact, even if the
> interface was mostly undocumented and afaict not tested by anything like
> xfstests for years...)
Yes, I'd prefer to stick to the btrfs behavior when XFS follow their
existing interface, unlesss said interface is clearly acknodged to be
broken by the original developers.
Now a 0 len as whole file sounds very useful, but I would prefer to get
an explicit buying from the btrfs crowd, and have btrfs implement it
properly first.
prev parent reply other threads:[~2016-10-21 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 7:46 About reflink len = 0 behavior Qu Wenruo
2016-10-20 7:50 ` Qu Wenruo
2016-10-20 15:47 ` Omar Sandoval
2016-10-21 3:00 ` Darrick J. Wong
2016-10-21 5:54 ` Qu Wenruo
2016-10-21 10:09 ` Christoph Hellwig [this message]
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=20161021100911.GA22612@infradead.org \
--to=hch@infradead.org \
--cc=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=osandov@osandov.com \
--cc=quwenruo@cn.fujitsu.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).