*****************
--- linux/drivers/md/md.c.orig	2002-10-13 21:37:34.000000000 +0200
+++ linux/drivers/md/md.c	2002-10-13 23:55:15.000000000 +0200
@@ -1794,9 +1794,15 @@
 	int err = 0, resync_interrupted = 0;
 	kdev_t dev = mddev_to_kdev(mddev);
 
-	if (atomic_read(&mddev->active)>1) {
-		printk(STILL_IN_USE, mdidx(mddev));
-		OUT(-EBUSY);
+	if (ro < 3 ) {
+		if (atomic_read(&mddev->active)>1) {
+			printk(STILL_IN_USE, mdidx(mddev));
+			OUT(-EBUSY);
+		}
+	} else {
+		if (atomic_read(&mddev->active)>1) {
+			printk("md: md%d forcing to read-only mode\n", mdidx(mddev));
+		}
 	}
 
 	if (mddev->pers) {
@@ -3608,7 +3614,7 @@
 		printk(KERN_INFO "md: stopping all md devices.\n");
 
 		ITERATE_MDDEV(mddev,tmp)
-			do_md_stop (mddev, 1);
+			do_md_stop (mddev, 3);
 		/*
 		 * certain more exotic SCSI devices are known to be
 		 * volatile wrt too early system reboots. While the
*****************
Thanks
Emilio Gargiulo 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/