Re: [PATCH 2/2] xfstests,btrfs/004: use FILEFRAG_PROG macro

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxx>
> >>> ---
> >>> 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@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux