]> rtime.felk.cvut.cz Git - linux-imx.git/commit
Btrfs: fix backref walking when we hit a compressed extent
authorJosef Bacik <jbacik@fusionio.com>
Fri, 5 Jul 2013 17:58:19 +0000 (13:58 -0400)
committerChris Mason <chris.mason@fusionio.com>
Fri, 9 Aug 2013 23:29:56 +0000 (19:29 -0400)
commit8ca15e05e6ac2745725d2d62394cfbe4ac335e84
treed0f17e655b2e6c40745d8d37593fbd868783d827
parentb76bb70136375c32d3b0bbbe2ebef738913d5b90
Btrfs: fix backref walking when we hit a compressed extent

If you do btrfs inspect-internal logical-resolve on a compressed extent that has
been partly overwritten it won't find anything.  This is because we try and
match the extent offset we've searched for based on the extent offset in the
data extent entry.  However this doesn't work for compressed extents because the
offsets are for the uncompressed size, not the compressed size.  So instead only
do this check if we are not compressed, that way we can get an actual entry for
the physical offset rather than nothing for compressed.  Thanks,

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