btrfs-progs: convert: Fix migrate_super_block() to work with 64k sectorsize
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Thu, 8 Dec 2016 13:56:20 +0000 (19:26 +0530)
committerDavid Sterba <dsterba@suse.com>
Wed, 14 Dec 2016 14:21:17 +0000 (15:21 +0100)
commit71ffdb50eccf409f3f50389ca6f2057db105e0f2
tree1120413778dcd29154507f5b1058d47ae55c596d
parent8583b613095a46b000e5ee333d6bf58cad0c2248
btrfs-progs: convert: Fix migrate_super_block() to work with 64k sectorsize

migrate_super_block() uses sectorsize to refer to the size of the
superblock. Hence on 64k sectorsize filesystems, it ends up computing
checksum beyond the super block length (i.e.
BTRFS_SUPER_INFO_SIZE). This commit fixes the bug by using
BTRFS_SUPER_INFO_SIZE instead of sectorsize of the underlying
filesystem.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
convert/main.c