aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 6ba5394834be..df090bf2eec0 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -158,6 +158,8 @@ int __btrfs_cow_block(struct btrfs_trans_handle *trans,
158 } else { 158 } else {
159 root_gen = 0; 159 root_gen = 0;
160 } 160 }
161 if (!(buf->flags & EXTENT_CSUM))
162 WARN_ON(1);
161 163
162 WARN_ON(root->ref_cows && trans->transid != 164 WARN_ON(root->ref_cows && trans->transid !=
163 root->fs_info->running_transaction->transid); 165 root->fs_info->running_transaction->transid);
@@ -245,6 +247,8 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans,
245 root->fs_info->generation); 247 root->fs_info->generation);
246 WARN_ON(1); 248 WARN_ON(1);
247 } 249 }
250 if (!(buf->flags & EXTENT_CSUM))
251 WARN_ON(1);
248 252
249 header_trans = btrfs_header_generation(buf); 253 header_trans = btrfs_header_generation(buf);
250 spin_lock(&root->fs_info->hash_lock); 254 spin_lock(&root->fs_info->hash_lock);
@@ -396,6 +400,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
396 if (search_start == 0) 400 if (search_start == 0)
397 search_start = last_block; 401 search_start = last_block;
398 402
403 btrfs_verify_block_csum(root, cur);
399 err = __btrfs_cow_block(trans, root, cur, parent, i, 404 err = __btrfs_cow_block(trans, root, cur, parent, i,
400 &tmp, search_start, 405 &tmp, search_start,
401 min(16 * blocksize, 406 min(16 * blocksize,