]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - io/fiemap.c
xfs_io: fix fiemap loop continuation
authorDave Chinner <dchinner@redhat.com>
Thu, 2 Feb 2012 06:21:14 +0000 (17:21 +1100)
committerChristoph Hellwig <hch@lst.de>
Sun, 5 Feb 2012 14:00:35 +0000 (14:00 +0000)
commit1b7b28f76db491bd55243846649d309fd98b7119
tree838fc915ecff01cdff3e90970d59ae9bd936fe34
parent7fd39587b16185b648743149f2801eb31ea2d85e
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