summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-03-15 15:32:16 -0400
committerDavid Sterba <dsterba@suse.cz>2013-04-23 18:56:20 +0200
commit7b20da8d525d11dabc98bdd49efef7b8be5576ab (patch)
tree8aed340d9c354b2387fffd9fe4e8b3d5f081ae35 /ctree.c
parente5c6852c0c4ce72205dd0bab40924d2ace75cb6f (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 'ctree.c')
-rw-r--r--ctree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ctree.c b/ctree.c
index 1778a51b..16f4daa9 100644
--- a/ctree.c
+++ b/ctree.c
@@ -235,7 +235,8 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
if (btrfs_block_can_be_shared(root, buf)) {
ret = btrfs_lookup_extent_info(trans, root, buf->start,
- buf->len, &refs, &flags);
+ btrfs_header_level(buf), 1,
+ &refs, &flags);
BUG_ON(ret);
BUG_ON(refs == 0);
} else {
@@ -277,7 +278,8 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
}
if (new_flags != 0) {
ret = btrfs_set_block_flags(trans, root, buf->start,
- buf->len, new_flags);
+ btrfs_header_level(buf),
+ new_flags);
BUG_ON(ret);
}
} else {