From: David Sterba Date: Wed, 6 Mar 2013 14:57:46 +0000 (+0100) Subject: btrfs: enhance superblock checks X-Git-Tag: v3.10-rc1~31^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1104a8855109a4051d74977f819a13b4516aa11e;p=pandora-kernel.git btrfs: enhance superblock checks The superblock checksum is not verified upon mount. Add that check and also reorder existing checks to a more logical order. Current mkfs.btrfs does not calculate the correct checksum of super_block and thus a freshly created filesytem will fail to mount when this patch is applied. First transaction commit calculates correct superblock checksum and saves it to disk. Reproducer: $ mfks.btrfs /dev/sda $ mount /dev/sda /mnt $ btrfs scrub start /mnt $ sleep 5 $ btrfs scrub status /mnt ... super:2 ... Signed-off-by: David Sterba Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed