tree c471a526b69594ce1bd7daa44ab50c51a0c6bfcf parent 3178b0dbdf67322f6506582e494bdf553cc85c32 author NeilBrown <[EMAIL PROTECTED]> Sat, 10 Sep 2005 06:23:50 -0700 committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 10 Sep 2005 06:39:11 -0700
[PATCH] md: allow hot-adding devices to arrays with non-persistant superblocks. It is possibly (and occasionally useful) to have a raid1 without persistent superblocks. The code in add_new_disk for adding a device to such an array always tries to read a superblock. This will obviously fail. So do the appropriate test and call md_import_device with appropriate args. Signed-off-by: Neil Brown <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> drivers/md/md.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2226,8 +2226,11 @@ static int add_new_disk(mddev_t * mddev, mdname(mddev)); return -EINVAL; } - rdev = md_import_device(dev, mddev->major_version, - mddev->minor_version); + if (mddev->persistent) + rdev = md_import_device(dev, mddev->major_version, + mddev->minor_version); + else + rdev = md_import_device(dev, -1, -1); if (IS_ERR(rdev)) { printk(KERN_WARNING "md: md_import_device returned %ld\n", - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html