Commit 667e7d94 authored by Chris Mason's avatar Chris Mason

Btrfs: allow superblock mismatch from older mkfs

We've added new checks to make sure the super block crc is correct
during mount.  A fresh filesystem from an older mkfs won't have the
crc set.  This adds a warning when it finds a newly created filesystem
but doesn't fail the mount.
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 1104a885
...@@ -383,6 +383,11 @@ static int btrfs_check_super_csum(char *raw_disk_sb) ...@@ -383,6 +383,11 @@ static int btrfs_check_super_csum(char *raw_disk_sb)
if (memcmp(raw_disk_sb, result, csum_size)) if (memcmp(raw_disk_sb, result, csum_size))
ret = 1; ret = 1;
if (ret && btrfs_super_generation(disk_sb) < 10) {
printk(KERN_WARNING "btrfs: super block crcs don't match, older mkfs detected\n");
ret = 0;
}
} }
if (csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) { if (csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment