diff options
Diffstat (limited to 'cmds-check.c')
-rw-r--r-- | cmds-check.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/cmds-check.c b/cmds-check.c index 7a86077d..f6fde23a 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -4911,15 +4911,17 @@ static int verify_backrefs(struct btrfs_trans_handle *trans, return 0; list_for_each_entry(back, &rec->backrefs, list) { + if (back->full_backref || !back->is_data) + continue; + dback = (struct data_backref *)back; + /* * We only pay attention to backrefs that we found a real * backref for. */ if (dback->found_ref == 0) continue; - if (back->full_backref) - continue; /* * For now we only catch when the bytes don't match, not the @@ -5035,6 +5037,9 @@ static int verify_backrefs(struct btrfs_trans_handle *trans, * references and fix up the ones that don't match. */ list_for_each_entry(back, &rec->backrefs, list) { + if (back->full_backref || !back->is_data) + continue; + dback = (struct data_backref *)back; /* @@ -5043,8 +5048,6 @@ static int verify_backrefs(struct btrfs_trans_handle *trans, */ if (dback->found_ref == 0) continue; - if (back->full_backref) - continue; if (dback->bytes == best->bytes && dback->disk_bytenr == best->bytenr) @@ -5264,14 +5267,16 @@ static int find_possible_backrefs(struct btrfs_trans_handle *trans, int ret; list_for_each_entry(back, &rec->backrefs, list) { + /* Don't care about full backrefs (poor unloved backrefs) */ + if (back->full_backref || !back->is_data) + continue; + dback = (struct data_backref *)back; /* We found this one, we don't need to do a lookup */ if (dback->found_ref) continue; - /* Don't care about full backrefs (poor unloved backrefs) */ - if (back->full_backref) - continue; + key.objectid = dback->root; key.type = BTRFS_ROOT_ITEM_KEY; key.offset = (u64)-1; |