* [PATCH] Btrfs-progs: fix misuse of skinny metadata in btrfs-image
@ 2013-06-14 3:20 Liu Bo
0 siblings, 0 replies; only message in thread
From: Liu Bo @ 2013-06-14 3:20 UTC (permalink / raw)
To: linux-btrfs
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-14 3:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 3:20 [PATCH] Btrfs-progs: fix misuse of skinny metadata in btrfs-image Liu Bo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).