aboutsummaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorAlexander Block2012-06-19 07:42:26 -0600
committerChris Mason2012-06-21 07:19:34 -0400
commit69bca40d41c613927b150c5392505f1894fe3010 (patch)
tree924b5d5f914a254f4348fc6b20e0e1e2e131a53c /block/blk.h
parent1c8f52a5e9539600543347bcdefafa1854e07986 (diff)
Btrfs: don't assume to be on the correct extent in add_all_parents
add_all_parents did assume that path is already at a correct extent data item, which may not be true in case of data extents that were partly rewritten and splitted. We need to check if we're on a matching extent for every item and only for the ones after the first. The loop is changed to do this now. This patch also fixes a bug introduced with commit 3b127fd8 "Btrfs: remove obsolete btrfs_next_leaf call from __resolve_indirect_ref". The removal of next_leaf did sometimes result in slot==nritems when the above described case happens, and thus resulting in invalid values (e.g. wanted_obejctid) in add_all_parents (leading to missed backrefs or even crashes). Signed-off-by: Alexander Block <ablock84@googlemail.com> Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'block/blk.h')
0 files changed, 0 insertions, 0 deletions