diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-10-14 23:23:08 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-12 03:58:32 +0100 |
commit | ed9e8af88e2551aaa6bf51d8063a2493e2d71597 (patch) | |
tree | daa194a93bdc98932618392c66f1d8410e44238c /fs/btrfs/tree-log.c | |
parent | Btrfs: add a sanity test for a vacant extent at the front of a file (diff) | |
download | linux-ed9e8af88e2551aaa6bf51d8063a2493e2d71597.tar.xz linux-ed9e8af88e2551aaa6bf51d8063a2493e2d71597.zip |
Btrfs: fix hole check in log_one_extent
I added an assert to make sure we were looking up aligned offsets for csums and
I tripped it when running xfstests. This is because log_one_extent was checking
if block_start == 0 for a hole instead of EXTENT_MAP_HOLE. This worked out fine
in practice it seems, but it adds a lot of extra work that is uneeded. With
this fix I'm no longer tripping my assert. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 849b72985c74..1134aa40b6d1 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3373,7 +3373,7 @@ static int log_one_extent(struct btrfs_trans_handle *trans, btrfs_set_token_file_extent_type(leaf, fi, BTRFS_FILE_EXTENT_REG, &token); - if (em->block_start == 0) + if (em->block_start == EXTENT_MAP_HOLE) skip_csum = true; } |