mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-11 03:31:17 +00:00
Btrfs-progs: fix misuse of skinny metadata in btrfs-image
As for skinny metadata, key.offset stores levels rather than extent length. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
parent
f00dd8386a
commit
699e69b7bd
@ -1169,9 +1169,9 @@ static int copy_from_extent_tree(struct metadump_struct *metadump,
|
||||
|
||||
bytenr = key.objectid;
|
||||
if (key.type == BTRFS_METADATA_ITEM_KEY)
|
||||
num_bytes = key.offset;
|
||||
else
|
||||
num_bytes = extent_root->leafsize;
|
||||
else
|
||||
num_bytes = key.offset;
|
||||
|
||||
if (btrfs_item_size_nr(leaf, path->slots[0]) > sizeof(*ei)) {
|
||||
ei = btrfs_item_ptr(leaf, path->slots[0],
|
||||
|
Loading…
Reference in New Issue
Block a user