]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_io: fix fiemap loop continuation
authorDave Chinner <dchinner@redhat.com>
Fri, 2 Mar 2012 08:34:58 +0000 (08:34 +0000)
committerChristoph Hellwig <hch@lst.de>
Fri, 2 Mar 2012 08:34:58 +0000 (08:34 +0000)
commitef45fa5e892a8f267c24f0e244082c36102d9347
tree8bee448d9df8e7e2f409645ec5bee8d8c2e95981
parent287d168b550857ce40e04b5f618d7eb91b87022f
xfs_io: fix fiemap loop continuation

When the fiemap command needs to retrieve more extents from the
kernel via a subsequent IO, it calculates the next logical block to
retrieve in file system block units. the fiemap needs the start
offset in bytes, not filesystem blocks.  Hence if the fiemap command
can loop forever retrieving the same blocks if the logical offset
offset of the next block in filesystem block units is smaller than
the number of bytes in a filessytem block. i.e. it will just loop
retreiving the first 32 extents from offset block zero.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
io/fiemap.c