The patch titled

     md: allow hot-adding devices to arrays with non-persistant superblocks.

has been added to the -mm tree.  Its filename is

     md-allow-hot-adding-devices-to-arrays-with-non-persistant-superblocks.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

md-make-sure-resync-gets-started-when-array-starts.patch
sunrpc-cache_register-can-use-wrong-module-reference.patch
md-fix-minor-error-in-raid10-read-balancing-calculation.patch
md-fail-io-request-to-md-that-require-a-barrier.patch
md-dont-allow-new-md-bitmap-file-to-be-set-if-one-already-exists.patch
md-improve-handling-of-bitmap-initialisation.patch
md-all-hot-add-and-hot-remove-of-md-intent-logging-bitmaps.patch
md-support-write-mostly-device-in-raid1.patch
md-add-write-behind-support-for-md-raid1.patch
md-support-md-linear-array-with-components-greater-than-2-terabytes.patch
md-raid1_quiesce-is-back-to-front-fix-it.patch
md-make-sure-bitmap_daemon_work-actually-does-work.patch
md-do-not-set-mddev-bitmap-until-bitmap-is-fully-initialised.patch
md-allow-hot-adding-devices-to-arrays-with-non-persistant-superblocks.patch
md-allow-md-to-load-a-superblock-with-feature-bit-1-set.patch
md-fix-bitmap-read_sb_page-so-that-it-handles-errors-properly.patch
drivers-md-fix-up-schedule_timeout-usage.patch



From: NeilBrown <[EMAIL PROTECTED]>

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]>
---

 drivers/md/md.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -puN 
drivers/md/md.c~md-allow-hot-adding-devices-to-arrays-with-non-persistant-superblocks
 drivers/md/md.c
--- 
devel/drivers/md/md.c~md-allow-hot-adding-devices-to-arrays-with-non-persistant-superblocks
 2005-08-21 22:36:01.000000000 -0700
+++ devel-akpm/drivers/md/md.c  2005-08-21 22:36:01.000000000 -0700
@@ -2225,8 +2225,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 mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to