diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-03-15 15:32:16 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-04-23 18:56:20 +0200 |
commit | 7b20da8d525d11dabc98bdd49efef7b8be5576ab (patch) | |
tree | 8aed340d9c354b2387fffd9fe4e8b3d5f081ae35 /btrfs-image.c | |
parent | e5c6852c0c4ce72205dd0bab40924d2ace75cb6f (diff) |
Btrfs-progs: add skinny metadata support to progs V3
This fixes up the progs to properly deal with skinny metadata. This adds the -x
option to mkfs and btrfstune for enabling the skinny metadata option. This also
makes changes to fsck so it can properly deal with the skinny metadata entries.
Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'btrfs-image.c')
-rw-r--r-- | btrfs-image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/btrfs-image.c b/btrfs-image.c index 9e13978c..9a0a2493 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -823,13 +823,17 @@ static int create_metadump(const char *input, FILE *out, int num_threads, btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if (key.objectid < bytenr || - key.type != BTRFS_EXTENT_ITEM_KEY) { + (key.type != BTRFS_EXTENT_ITEM_KEY && + key.type != BTRFS_METADATA_ITEM_KEY)) { path->slots[0]++; continue; } bytenr = key.objectid; - num_bytes = key.offset; + if (key.type == BTRFS_METADATA_ITEM_KEY) + num_bytes = key.offset; + else + num_bytes = root->leafsize; if (btrfs_item_size_nr(leaf, path->slots[0]) > sizeof(*ei)) { ei = btrfs_item_ptr(leaf, path->slots[0], |