From: Dave Chinner <david@fromorbit.com>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>, fstests@vger.kernel.org
Subject: Re: [PATCH 2/2] xfstests,btrfs/004: use FILEFRAG_PROG macro
Date: Wed, 8 Oct 2014 16:54:44 +1100 [thread overview]
Message-ID: <20141008055444.GJ12693@dastard> (raw)
In-Reply-To: <F03A6FA1-97B6-41B9-B12B-26626B7B3CF2@gmail.com>
On Wed, Oct 08, 2014 at 01:31:24PM +0800, Wang Shilong wrote:
> Cc list
>
> > On Wed, Oct 08, 2014 at 06:35:22AM -0400, Wang Shilong wrote:
> >>> Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
> >>> ---
> >>> i didn't find a way to remove filefrag here, but let us
> >>> use macro firstly...
> >>
> >> YOu shoul dbe able to use fiemap to calculate the same output.
> >> i.e. _check_file_extents() outputs a strings of the format
> >> #physical#length#logical#flags and this is then cut up later
> >> later by the test. fiemap outputs the same information,
> >> it just requires slightly different processing via the
> >> _filter_extents function to munge it into the same format…
> >
> > I supposed there are some differences between fiemap and filefrag:
> >
> > [root@vm01 mnt]# filefrag -v data
> > Filesystem type is: 9123683e
> > File size of data is 1024 (1 block of 4096 bytes)
> > ext: logical_offset: physical_offset: length: expected: flags:
> > 0: 0.. 4095: 0.. 4095: 4096: not_aligned,inline,eof
> > data: 1 extent found
> >
> > [root@vm01 mnt]# xfs_io -c fiemap data
> > data:
> > 0: [0..7]: 0..7
Of course. Units, for one: the output of filefrag is in bytes, while
fiemap is in 512 byte blocks. And fiemap needs the "-v" option to
output the flag state. Same information, different presentation.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2014-10-08 5:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 10:35 [PATCH 1/2] xfstests,btrfs/010: use _extent_count() helper Wang Shilong
2014-10-08 10:35 ` [PATCH 2/2] xfstests,btrfs/004: use FILEFRAG_PROG macro Wang Shilong
2014-10-08 4:20 ` Dave Chinner
[not found] ` <773629AA-9F58-4A1A-A5D0-6CC0B5121233@gmail.com>
2014-10-08 5:31 ` Wang Shilong
2014-10-08 5:54 ` Dave Chinner [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=20141008055444.GJ12693@dastard \
--to=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wangshilong1991@gmail.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).