]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: do not offset physical if we're compressed
authorJosef Bacik <jbacik@fusionio.com>
Fri, 5 Jul 2013 17:52:51 +0000 (13:52 -0400)
committerChris Mason <chris.mason@fusionio.com>
Fri, 9 Aug 2013 23:29:50 +0000 (19:29 -0400)
commitde31f421dcaf3b14863c7f2f61e75ce884d5ebff
tree1bc8aa36f47041ebf67fc4254bf69b375e3a13ce
parente120779aba5fae53739b927cbe6b33e2c001a839
Btrfs: do not offset physical if we're compressed

xfstest btrfs/276 was freaking out on slower boxes partly because fiemap was
offsetting the physical based on the extent offset.  This is perfectly fine with
uncompressed extents, however the extent offset is into the uncompressed area,
not the compressed.  So we can return a physical value that isn't at all within
the area we have allocated on disk.  Fix this by returning the start of the
extent if it is compressed no matter what the offset.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/extent_io.c