From a37e1e720451664477b030242616b3e48d31013e Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Fri, 4 Apr 2008 15:42:17 -0400 Subject: Recow all roots at the end of mkfs The mkfs code bootstraps the filesystem on a single device. Once the raid block groups are setup, it needs to recow all of the blocks so that each tree is properly allocated. --- ctree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ctree.c') diff --git a/ctree.c b/ctree.c index 5e423754..051cab59 100644 --- a/ctree.c +++ b/ctree.c @@ -244,11 +244,8 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans, (unsigned long long)root->fs_info->generation); WARN_ON(1); } - if (btrfs_header_generation(buf) == trans->transid) { -#if 0 - && + if (btrfs_header_generation(buf) == trans->transid && !btrfs_header_flag(buf, BTRFS_HEADER_FLAG_WRITTEN)) { -#endif *cow_ret = buf; return 0; } -- cgit v1.2.3