From: Neil Brown <neilb@cse.unsw.edu.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-raid@vger.kernel.org
Subject: PATCH - md 1 of 3 - Don't lock array for START_ARRAY
Date: Thu, 20 Jun 2002 10:04:32 +1000 (EST) [thread overview]
Message-ID: <15633.7184.23273.128208@notabene.cse.unsw.edu.au> (raw)
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;
reply other threads:[~2002-06-20 0:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15633.7184.23273.128208@notabene.cse.unsw.edu.au \
--to=neilb@cse.unsw.edu.au \
--cc=linux-raid@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).