Liu Bo
2013-Jun-14 03:20 UTC
[PATCH] 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>
---
btrfs-image.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/btrfs-image.c b/btrfs-image.c
index 739ae35..e5ff795 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -798,9 +798,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],
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Apparently Analagous Threads
- [PATCH] Btrfs-progs: add skinny metadata support to progs V3
- [PATCH] Btrfs: fix not being able to find skinny extents during relocate
- [PATCH] Btrfs-progs: remove unused variable and update btrfs-image man page
- [PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
- [PATCH] btrfs-progs: btrfs-image.c: Added NULL pointer check.
