btrfs-progs: mkfs: use correct size for superblock csum and writeout
authorDavid Sterba <dsterba@suse.com>
Thu, 19 Nov 2015 14:55:05 +0000 (15:55 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 19 Nov 2015 15:00:31 +0000 (16:00 +0100)
commitbf1ac8305ab3f191d9345793b88c4f5ec691cb9b
treedfcb8551a6a5f080cc5323f98e7daeefbda59e7a
parent37a3f647569eb7f944a8ac65dc8763bbb877628d
btrfs-progs: mkfs: use correct size for superblock csum and writeout

If sectorsize is not BTRFS_SUPER_INFO_SIZE (4k), the superblock checksum
is wrong and mkfs fails. This has been reported on ppc64 where we pick
sectorisize from page size (64k).  This has been broken since ages
(2008) and discovered by the recently added superblock checks.

Reported-by: Dinar Valeev <dvaleev@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
utils.c