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

Commit df968c4e authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds
Browse files

md: improve message about invalid superblock during autodetect



People try to use raid auto-detect with version-1 superblocks (which is not
supported) and get confused when they are told they have an invalid
superblock.

So be more explicit, and say it it is not a valid v0.90 superblock.

Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent afd44034
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -2074,8 +2074,10 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi
			load_super(rdev, NULL, super_minor);
			load_super(rdev, NULL, super_minor);
		if (err == -EINVAL) {
		if (err == -EINVAL) {
			printk(KERN_WARNING
			printk(KERN_WARNING
				"md: %s has invalid sb, not importing!\n",
				"md: %s does not have a valid v%d.%d "
				bdevname(rdev->bdev,b));
			       "superblock, not importing!\n",
				bdevname(rdev->bdev,b),
			       super_format, super_minor);
			goto abort_free;
			goto abort_free;
		}
		}
		if (err < 0) {
		if (err < 0) {
@@ -5771,7 +5773,7 @@ static void autostart_arrays(int part)
	for (i = 0; i < dev_cnt; i++) {
	for (i = 0; i < dev_cnt; i++) {
		dev_t dev = detected_devices[i];
		dev_t dev = detected_devices[i];


		rdev = md_import_device(dev,0, 0);
		rdev = md_import_device(dev,0, 90);
		if (IS_ERR(rdev))
		if (IS_ERR(rdev))
			continue;
			continue;