* PATCH - md 1 of 3 - Don't lock array for START_ARRAY
@ 2002-06-20 0:04 Neil Brown
0 siblings, 0 replies; only message in thread
From: Neil Brown @ 2002-06-20 0:04 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-raid
Well, it looks like that bit patch bomb wasn't quite perfect..
Here are three more, against 2.5.23, that address:
- "raidstart" would hang
- compiler warning
- compile failure when not SMP.
NeilBrown
###Comments for ChangeSet
... as autostart_array does it's own locking.
----------- Diffstat output ------------
./drivers/md/md.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
--- ./drivers/md/md.c 2002/06/19 04:28:22 1.1
+++ ./drivers/md/md.c 2002/06/19 23:20:56 1.2
@@ -2546,6 +2546,20 @@
goto abort;
}
+
+ if (cmd == START_ARRAY) {
+ /* START_ARRAY doesn't need to lock the array as autostart_array
+ * does the locking, and it could even be a different array
+ */
+ err = autostart_array(val_to_kdev(arg));
+ if (err) {
+ printk(KERN_WARNING "md: autostart %s failed!\n",
+ partition_name(val_to_kdev(arg)));
+ goto abort;
+ }
+ goto done;
+ }
+
err = mddev_lock(mddev);
if (err) {
printk(KERN_INFO "md: ioctl lock interrupted, reason %d, cmd %d\n",
@@ -2580,18 +2594,6 @@
printk(KERN_WARNING "md: couldnt set array info. %d\n", err);
goto abort_unlock;
}
- }
- goto done_unlock;
-
- case START_ARRAY:
- /*
- * possibly make it lock the array ...
- */
- err = autostart_array(val_to_kdev(arg));
- if (err) {
- printk(KERN_WARNING "md: autostart %s failed!\n",
- partition_name(val_to_kdev(arg)));
- goto abort_unlock;
}
goto done_unlock;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-20 0:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-20 0:04 PATCH - md 1 of 3 - Don't lock array for START_ARRAY Neil Brown
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).