Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e56a951e authored by Liu Bo's avatar Liu Bo Committed by Chris Mason
Browse files

Btrfs: Remove the check for old-style mkfs

This was used to make sure that a fresh btrfs from an older mkfs.btrfs,
but it also allows us to mount a buggy btrfs if this btrfs has the right
superblock head part but has something wrong with chunk tree part[1], and
after that we can hit BUG_ON()s set in the code to prevent something
impossible.

Since David has released "Btrfs progs v3.19-rc2", just remove the check,
if anyone who wants to make a fresh btrfs, please use the latest one.

[1]: http://www.spinics.net/lists/linux-btrfs/msg42358.html



Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarOmar Sandoval <osandov@osandov.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 727b9784
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -419,12 +419,6 @@ 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)) {