aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/tree-log.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 257cbae8c948..18891c009641 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3421,11 +3421,6 @@ static int log_one_extent(struct btrfs_trans_handle *trans,
3421 if (skip_csum) 3421 if (skip_csum)
3422 return 0; 3422 return 0;
3423 3423
3424 if (em->compress_type) {
3425 csum_offset = 0;
3426 csum_len = block_len;
3427 }
3428
3429 /* 3424 /*
3430 * First check and see if our csums are on our outstanding ordered 3425 * First check and see if our csums are on our outstanding ordered
3431 * extents. 3426 * extents.
@@ -3509,8 +3504,13 @@ unlocked:
3509 if (!mod_len || ret) 3504 if (!mod_len || ret)
3510 return ret; 3505 return ret;
3511 3506
3512 csum_offset = mod_start - em->start; 3507 if (em->compress_type) {
3513 csum_len = mod_len; 3508 csum_offset = 0;
3509 csum_len = block_len;
3510 } else {
3511 csum_offset = mod_start - em->start;
3512 csum_len = mod_len;
3513 }
3514 3514
3515 /* block start is already adjusted for the file extent offset. */ 3515 /* block start is already adjusted for the file extent offset. */
3516 ret = btrfs_lookup_csums_range(log->fs_info->csum_root, 3516 ret = btrfs_lookup_csums_range(log->fs_info->csum_root,