From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
Nikolay Borisov <nborisov@suse.com>,
eguan@redhat.com, linux-xfs@vger.kernel.org,
fstests@vger.kernel.org
Subject: Re: [PATCH v7] generic: initial fiemap range query test
Date: Thu, 7 Dec 2017 09:16:03 +1100 [thread overview]
Message-ID: <20171206221603.GH5858@dastard> (raw)
In-Reply-To: <61675ab2-0943-e5d7-8c94-247d3ef68a05@sandeen.net>
On Wed, Dec 06, 2017 at 04:01:58PM -0600, Eric Sandeen wrote:
> On 12/6/17 3:57 PM, Dave Chinner wrote:
>
> > There's a *simple answer* to this problem: fix the new command's
> > output.
> >
> > That is: the user asked for a specific range, so the command itself
> > should trim the map returned by the kernel to only display the exact
> > range the user asked for. Then it doesn't matter if the underlying
> > filesystem trims the extents or not, because the we're going to do
> > that anyway in userspace.
>
> I have a different opinion:
>
> xfs_io is a debugging tool; the fiemap command sends an ioctl to the kernel.
>
> Ranged fiemap queries are a real thing; you put numbers into the kernel,
> and you get numbers out of the kernel.
>
> IMNSO, xfs_io should present to the user /what the kernel returned/,
> and not re-interpret it to fit some other notion of correctness if we
> don't like what the kernel told us.
I hardly think "trimming to the range the user asked for" is
"re-interpreting what the kernel told us". It's limiting output
range to exactly what the user asked for - the output is still
correct regardless of how it's filtered to match what the user asked
for....
> If you want to have some user-friendlier behavior where xfs_io layers
> behaviors on top of what the kernel provides, then add a "-t" argument for trim,
> but hiding ioctl inconsistencies by filtering them through xfs_io sounds
> like the wrong approach to me.
Just filter the last output in the test, then, so it looks like
2: [128..XXX] data
There is absolutely no excuse for creating multiple tests to support
a small difference in trailing extent range output from different
filesystem.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-12-06 22:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 16:05 [PATCH v7] generic: initial fiemap range query test Nikolay Borisov
2017-12-05 8:24 ` Eryu Guan
2017-12-05 16:51 ` Darrick J. Wong
2017-12-06 8:28 ` Eryu Guan
2017-12-06 17:45 ` Darrick J. Wong
2017-12-06 20:51 ` Nikolay Borisov
2017-12-06 21:06 ` Darrick J. Wong
2017-12-06 21:57 ` Dave Chinner
2017-12-06 22:01 ` Eric Sandeen
2017-12-06 22:16 ` Dave Chinner [this message]
2017-12-06 22:22 ` Eric Sandeen
2017-12-06 22:46 ` Darrick J. Wong
2017-12-06 23:01 ` Eric Sandeen
2017-12-07 6:55 ` Nikolay Borisov
2017-12-15 8:33 ` Nikolay Borisov
2017-12-15 8:41 ` Eryu Guan
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=20171206221603.GH5858@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=sandeen@sandeen.net \
/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).