From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-xfs@vger.kernel.org, sandeen@redhat.com
Subject: Re: [PATCH v2] fiemap: Allow to specify range to fiemap
Date: Thu, 10 Aug 2017 14:12:08 -0700 [thread overview]
Message-ID: <20170810211208.GY24087@magnolia> (raw)
In-Reply-To: <c254f712-e2bd-502b-515f-5ba20097bffd@suse.com>
On Thu, Aug 10, 2017 at 07:46:35PM +0300, Nikolay Borisov wrote:
>
>
> On 10.08.2017 19:13, Darrick J. Wong wrote:
> > We don't decrement len each time through the ioctl loop? Doesn't that
> > cause us to request and retrieve rows for ranges we don't want?
>
> Hm, you are right, I believe on every iteration we should do:
>
> len -= last_logical - start_offset
start_offset doesn't change, right?
I would think len -= last_logical - fiemap->fm_start.
Or just calculate end_offset = start_offset + length and set
fiemap->fm_length = end_offset - last_logical...
...though now that I look at that file even closer I wonder what is
going on with that outer while loop counting extents? Does -n exist to
let users cap the number of records to print, even if that means we
don't make it to the end of the range requested?
--D
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-08-10 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 11:07 [PATCH] fiemap: Allow to specify range to fiemap Nikolay Borisov
2017-08-10 12:04 ` Dave Chinner
2017-08-10 12:30 ` [PATCH v2] " Nikolay Borisov
2017-08-10 16:13 ` Darrick J. Wong
2017-08-10 16:46 ` Nikolay Borisov
2017-08-10 21:12 ` Darrick J. Wong [this message]
2017-08-10 21:22 ` Eric Sandeen
2017-08-10 21:57 ` Eric Sandeen
2017-08-11 5:38 ` Nikolay Borisov
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=20170810211208.GY24087@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=sandeen@redhat.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