summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-10-14 21:23:08 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-20 15:45:12 (GMT)
commitb395193ecf087a36e98b97c396f839b3fe9a4d19 (patch)
tree3f3754fe4c3737bd8f70921c2584f6c95c4c094e
parentfb5834ff2b2823e1eaecd920e2ade3e07f4a42f9 (diff)
downloadlinux-3.10-b395193ecf087a36e98b97c396f839b3fe9a4d19.zip
linux-3.10-b395193ecf087a36e98b97c396f839b3fe9a4d19.tar.gz
linux-3.10-b395193ecf087a36e98b97c396f839b3fe9a4d19.tar.bz2
Btrfs: fix hole check in log_one_extent
commit ed9e8af88e2551aaa6bf51d8063a2493e2d71597 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/btrfs/tree-log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index cf68596..bca4363 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3314,7 +3314,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;
}