btrfs-progs: Remove non-exist csum size.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Wed, 13 May 2015 09:15:33 +0000 (17:15 +0800)
committerDavid Sterba <dsterba@suse.cz>
Thu, 14 May 2015 13:41:08 +0000 (15:41 +0200)
Current btrfs only support CRC32 as checksum algorithm.
But in btrfs_csum_sizes array, we have an extra 0 at tail, causing
csum_type 1 can still be considered as supported csum type.

Fix it by removing the tailing 0.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
ctree.h

diff --git a/ctree.h b/ctree.h
index 79a3310..f14a795 100644 (file)
--- a/ctree.h
+++ b/ctree.h
@@ -149,7 +149,7 @@ struct btrfs_free_space_ctl;
 /* csum types */
 #define BTRFS_CSUM_TYPE_CRC32  0
 
-static int btrfs_csum_sizes[] = { 4, 0 };
+static int btrfs_csum_sizes[] = { 4 };
 
 /* four bytes for CRC32 */
 #define BTRFS_CRC32_SIZE 4