diff options
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 977e9c66f2e3..3da8f42e08a9 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -295,10 +295,9 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, | |||
295 | ret = btrfs_search_old_slot(root, &ref->key_for_search, path, time_seq); | 295 | ret = btrfs_search_old_slot(root, &ref->key_for_search, path, time_seq); |
296 | pr_debug("search slot in root %llu (level %d, ref count %d) returned " | 296 | pr_debug("search slot in root %llu (level %d, ref count %d) returned " |
297 | "%d for key (%llu %u %llu)\n", | 297 | "%d for key (%llu %u %llu)\n", |
298 | (unsigned long long)ref->root_id, level, ref->count, ret, | 298 | ref->root_id, level, ref->count, ret, |
299 | (unsigned long long)ref->key_for_search.objectid, | 299 | ref->key_for_search.objectid, ref->key_for_search.type, |
300 | ref->key_for_search.type, | 300 | ref->key_for_search.offset); |
301 | (unsigned long long)ref->key_for_search.offset); | ||
302 | if (ret < 0) | 301 | if (ret < 0) |
303 | goto out; | 302 | goto out; |
304 | 303 | ||
@@ -1328,8 +1327,7 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, | |||
1328 | found_key->type != BTRFS_METADATA_ITEM_KEY) || | 1327 | found_key->type != BTRFS_METADATA_ITEM_KEY) || |
1329 | found_key->objectid > logical || | 1328 | found_key->objectid > logical || |
1330 | found_key->objectid + size <= logical) { | 1329 | found_key->objectid + size <= logical) { |
1331 | pr_debug("logical %llu is not within any extent\n", | 1330 | pr_debug("logical %llu is not within any extent\n", logical); |
1332 | (unsigned long long)logical); | ||
1333 | return -ENOENT; | 1331 | return -ENOENT; |
1334 | } | 1332 | } |
1335 | 1333 | ||
@@ -1342,11 +1340,8 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, | |||
1342 | 1340 | ||
1343 | pr_debug("logical %llu is at position %llu within the extent (%llu " | 1341 | pr_debug("logical %llu is at position %llu within the extent (%llu " |
1344 | "EXTENT_ITEM %llu) flags %#llx size %u\n", | 1342 | "EXTENT_ITEM %llu) flags %#llx size %u\n", |
1345 | (unsigned long long)logical, | 1343 | logical, logical - found_key->objectid, found_key->objectid, |
1346 | (unsigned long long)(logical - found_key->objectid), | 1344 | found_key->offset, flags, item_size); |
1347 | (unsigned long long)found_key->objectid, | ||
1348 | (unsigned long long)found_key->offset, | ||
1349 | (unsigned long long)flags, item_size); | ||
1350 | 1345 | ||
1351 | WARN_ON(!flags_ret); | 1346 | WARN_ON(!flags_ret); |
1352 | if (flags_ret) { | 1347 | if (flags_ret) { |
@@ -1518,7 +1513,7 @@ int iterate_extent_inodes(struct btrfs_fs_info *fs_info, | |||
1518 | while (!ret && (root_node = ulist_next(roots, &root_uiter))) { | 1513 | while (!ret && (root_node = ulist_next(roots, &root_uiter))) { |
1519 | pr_debug("root %llu references leaf %llu, data list " | 1514 | pr_debug("root %llu references leaf %llu, data list " |
1520 | "%#llx\n", root_node->val, ref_node->val, | 1515 | "%#llx\n", root_node->val, ref_node->val, |
1521 | (long long)ref_node->aux); | 1516 | ref_node->aux); |
1522 | ret = iterate_leaf_refs((struct extent_inode_elem *) | 1517 | ret = iterate_leaf_refs((struct extent_inode_elem *) |
1523 | (uintptr_t)ref_node->aux, | 1518 | (uintptr_t)ref_node->aux, |
1524 | root_node->val, | 1519 | root_node->val, |
@@ -1610,9 +1605,8 @@ static int iterate_inode_refs(u64 inum, struct btrfs_root *fs_root, | |||
1610 | name_len = btrfs_inode_ref_name_len(eb, iref); | 1605 | name_len = btrfs_inode_ref_name_len(eb, iref); |
1611 | /* path must be released before calling iterate()! */ | 1606 | /* path must be released before calling iterate()! */ |
1612 | pr_debug("following ref at offset %u for inode %llu in " | 1607 | pr_debug("following ref at offset %u for inode %llu in " |
1613 | "tree %llu\n", cur, | 1608 | "tree %llu\n", cur, found_key.objectid, |
1614 | (unsigned long long)found_key.objectid, | 1609 | fs_root->objectid); |
1615 | (unsigned long long)fs_root->objectid); | ||
1616 | ret = iterate(parent, name_len, | 1610 | ret = iterate(parent, name_len, |
1617 | (unsigned long)(iref + 1), eb, ctx); | 1611 | (unsigned long)(iref + 1), eb, ctx); |
1618 | if (ret) | 1612 | if (ret) |