Whamcloud - gitweb
filefrag: Display the number of contiguous, not physical, extents
authorTheodore Ts'o <tytso@mit.edu>
Fri, 30 Sep 2011 22:43:39 +0000 (18:43 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 1 Oct 2011 01:28:39 +0000 (21:28 -0400)
commita00be17e4768c5ce55f74be518f35f5d5d1b158b
tree6ef9bf8d95770c5f139a55b7ab2aaf419e085be1
parent27b422f57ba0435a53776537ba3a2f4339b350d0
filefrag: Display the number of contiguous, not physical, extents

From a bug report filed by Ibragimov Rinat:

   When filefrag uses FIEMAP ioctl its logic differs for ordinary and
   verbose (-v) modes. ext4 returns extent on every 32768 block so on
   large files it is possible that `filefrag large-file' tells about 4
   extents while `filefrag -v large-file' finds only one.

   Also when I tried to use generic_block_fiemap function to add
   FIEMAP for reiserfs, every block was reported as a new extent
   resulting in thousands "extents" for continuous files.

   I think filefrag should merge adjacent extents even when -v is not
   specified.

Addresses-Debian-Bug: #631498

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/filefrag.c