linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md - 6 of 10 - Don't do_md_stop and array when do_md_run fails.
@ 2004-01-16  1:19 NeilBrown
  0 siblings, 0 replies; only message in thread
From: NeilBrown @ 2004-01-16  1:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


Current code calls do_md_stop to clean up if do_md_run
fails, but this is 
  a/ not needed as do_md_run cleans up itself
  b/ bad as it could try to clean up after an -EBUSY error !!!

 ----------- Diffstat output ------------
 ./drivers/md/md.c |   15 +--------------
 1 files changed, 1 insertion(+), 14 deletions(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2004-01-16 12:05:40.000000000 +1100
+++ ./drivers/md/md.c	2004-01-16 12:06:25.000000000 +1100
@@ -1764,10 +1764,8 @@ static void autorun_array(mddev_t *mddev
 	printk("\n");
 
 	err = do_md_run (mddev);
-	if (err) {
+	if (err)
 		printk(KERN_WARNING "md :do_md_run() returned %d\n", err);
-		do_md_stop (mddev, 0);
-	}
 }
 
 /*
@@ -2569,19 +2567,8 @@ static int md_ioctl(struct inode *inode,
 			goto done_unlock;
 
 		case RUN_ARRAY:
-		{
 			err = do_md_run (mddev);
-			/*
-			 * we have to clean up the mess if
-			 * the array cannot be run for some
-			 * reason ...
-			 * ->pers will not be set, to superblock will
-			 * not be updated.
-			 */
-			if (err)
-				do_md_stop (mddev, 0);
 			goto done_unlock;
-		}
 
 		default:
 			if (_IOC_TYPE(cmd) == MD_MAJOR)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-16  1:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-16  1:19 [PATCH] md - 6 of 10 - Don't do_md_stop and array when do_md_run fails NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).