From b48dcf5bffd9521773029dd6448e57c48e03c877 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 31 May 2010 08:58:47 +0000 Subject: [PATCH] --- yaml --- r: 200354 b: refs/heads/master c: 046f264f6b3b2cf7e5a1769fc92335d8a9316282 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/relocation.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 6234f2ec9bea..a340ae5fd632 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 058a457ef0ce28d595af53d6103db73332383cbc +refs/heads/master: 046f264f6b3b2cf7e5a1769fc92335d8a9316282 diff --git a/trunk/fs/btrfs/relocation.c b/trunk/fs/btrfs/relocation.c index 05d41e569236..b37d723b9d4a 100644 --- a/trunk/fs/btrfs/relocation.c +++ b/trunk/fs/btrfs/relocation.c @@ -784,16 +784,17 @@ struct backref_node *build_backref_tree(struct reloc_control *rc, struct btrfs_extent_ref_v0 *ref0; ref0 = btrfs_item_ptr(eb, path1->slots[0], struct btrfs_extent_ref_v0); - root = find_tree_root(rc, eb, ref0); - if (!root->ref_cows) - cur->cowonly = 1; if (key.objectid == key.offset) { + root = find_tree_root(rc, eb, ref0); if (root && !should_ignore_root(root)) cur->root = root; else list_add(&cur->list, &useless); break; } + if (is_cowonly_root(btrfs_ref_root_v0(eb, + ref0))) + cur->cowonly = 1; } #else BUG_ON(key.type == BTRFS_EXTENT_REF_V0_KEY);