Skip to content

Commit

Permalink
md: improve message about invalid superblock during autodetect
Browse files Browse the repository at this point in the history
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: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Jul 17, 2007
1 parent afd4403 commit df968c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -2073,9 +2073,11 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi
err = super_types[super_format].
load_super(rdev, NULL, super_minor);
if (err == -EINVAL) {
printk(KERN_WARNING
"md: %s has invalid sb, not importing!\n",
bdevname(rdev->bdev,b));
printk(KERN_WARNING
"md: %s does not have a valid v%d.%d "
"superblock, not importing!\n",
bdevname(rdev->bdev,b),
super_format, super_minor);
goto abort_free;
}
if (err < 0) {
Expand Down Expand Up @@ -5771,7 +5773,7 @@ static void autostart_arrays(int part)
for (i = 0; i < dev_cnt; 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))
continue;

Expand Down

0 comments on commit df968c4

Please sign in to comment.