From 7b20da8d525d11dabc98bdd49efef7b8be5576ab Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 15 Mar 2013 15:32:16 -0400 Subject: 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 --- ctree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ctree.c') 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 { -- cgit v1.2.1