From: Dave Chinner <david@fromorbit.com>
To: Jim Wilcoxson <prirun@gmail.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, xfs@oss.sgi.com
Subject: Re: XFS fiemap issue with Linux 3.10.0-327.el7.x86_64 (CentOS 7)
Date: Tue, 16 Feb 2016 07:40:09 +1100 [thread overview]
Message-ID: <20160215204009.GJ14668@dastard> (raw)
In-Reply-To: <CAJkH1p5ZP-Wg=UgwBZKz6rZS=_5-o625HZPAosW7tt-zpaNDOg@mail.gmail.com>
On Mon, Feb 15, 2016 at 02:28:36PM -0500, Jim Wilcoxson wrote:
> Thanks Eric.
>
> I ran xfs_bmap -v and it returned extents 0-19999, alternating data
> with holes. The holes and data were various sizes, I suppose for xfs
> alignment reasons, but everything was there.
>
> Running fiemap again after xfs_bmap still returned 1364 extents.
Yes, fiemap in XFS uses a buffer size of:
bm.bmv_count = min_t(__s32, bm.bmv_count,
(PAGE_SIZE * 16 / sizeof(struct getbmapx)));
i.e. limits a single fiemap fetch to a maximum of 64k of extent
data.
I think you have an incorrect assumption about fiemap behaviour.
fiemap is not designed to return or even count all the extents in a
file in a single call; on XFS it returns how many extents it can
return in a single call. When you then map the file, if the
FIEMAP_EXTENT_LAST is not set on the last extent returned, then the
application needs to make another FIEMAP call from the end offset of
last extent mapping returned in the last call, and it will then
return the next N extents in the file.
IOWs, you have to keep calling FIEMAP to map the entire file, not
assume a single call will return an arbitrary amount of data to you
in a single call.
But, as Eric said - fiemap is a diagnosis tool, not an interface you
can rely on for anything involving data movement.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-02-15 20:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 17:26 XFS fiemap issue with Linux 3.10.0-327.el7.x86_64 (CentOS 7) Jim Wilcoxson
2016-02-15 18:33 ` Eric Sandeen
2016-02-15 19:28 ` Jim Wilcoxson
2016-02-15 20:40 ` Dave Chinner [this message]
2016-02-15 22:47 ` Eric Sandeen
2016-02-16 0:20 ` Dave Chinner
2016-02-16 0:23 ` Eric Sandeen
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=20160215204009.GJ14668@dastard \
--to=david@fromorbit.com \
--cc=prirun@gmail.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.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