Skip to content

Commit

Permalink
Btrfs: allow superblock mismatch from older mkfs
Browse files Browse the repository at this point in the history
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: Chris Mason <chris.mason@fusionio.com>
  • Loading branch information
Chris Mason committed May 7, 2013
1 parent 1104a88 commit 667e7d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,11 @@ static int btrfs_check_super_csum(char *raw_disk_sb)

if (memcmp(raw_disk_sb, result, csum_size))
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)) {
Expand Down

0 comments on commit 667e7d9

Please sign in to comment.