aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2010-06-14 12:54:57 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-06-14 12:54:57 +0200
commit575f552012ec0cd6591fd85ee996d5a5ad1a669a (patch)
tree86b9882f04e75e2fb1046f9c82f8c82c86810c80 /fs/btrfs/relocation.c
parentwriteback: fix pin_sb_for_writeback (diff)
parentdrbd: Fixed a race between disk-attach and unexpected state changes (diff)
downloadlinux-dev-575f552012ec0cd6591fd85ee996d5a5ad1a669a.tar.xz
linux-dev-575f552012ec0cd6591fd85ee996d5a5ad1a669a.zip
Merge branch 'for-jens' of git://git.drbd.org/linux-2.6-drbd into for-linus
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 05d41e569236..b37d723b9d4a 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -784,16 +784,17 @@ again:
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);