Linux RAID subsystem development
 help / color / mirror / Atom feed
From: NeilBrown <neilb@cse.unsw.edu.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] md - 1 of 7 - Fix possible hang in raid shutdown.
Date: Fri, 23 Jan 2004 11:14:23 +1100	[thread overview]
Message-ID: <E1Ajoxr-0000jH-00@notabene> (raw)
In-Reply-To: 20040123105615.2237.patches@notabene


If a raid array was syncing on shutdown, it would hang on shutdown,
constantly re-entering md_enter_safemade.  This fixes it.

 ----------- Diffstat output ------------
 ./drivers/md/md.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2004-01-23 10:30:08.000000000 +1100
+++ ./drivers/md/md.c	2004-01-23 10:32:24.000000000 +1100
@@ -3106,7 +3106,8 @@ static inline void md_enter_safemode(mdd
 {
 	if (!mddev->safemode) return;
 	if (mddev->safemode == 2 &&
-	    (atomic_read(&mddev->writes_pending) || mddev->in_sync))
+	    (atomic_read(&mddev->writes_pending) || mddev->in_sync ||
+		    mddev->recovery_cp != MaxSector))
 		return; /* avoid the lock */
 	mddev_lock_uninterruptible(mddev);
 	if (mddev->safemode && !atomic_read(&mddev->writes_pending) &&

  parent reply	other threads:[~2004-01-23  0:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-23  0:13 [PATCH] md - 0 of 7 - Introduction NeilBrown
2004-01-23  0:14 ` [PATCH] md - 2 of 7 - Move the test in preferred_minor to where it is used NeilBrown
2004-01-23  0:14 ` NeilBrown [this message]
2004-01-23  0:14 ` [PATCH] md - 3 of 7 - Fixes to make debuging output nicer NeilBrown
2004-01-23  0:14 ` [PATCH] md - 5 of 7 - Change the way the name of an md device is printed in error messages NeilBrown
2004-01-23  0:14 ` [PATCH] md - 4 of 7 - Collect device IO statistics for MD personalities NeilBrown
2004-01-23  0:14 ` [PATCH] md - 6 of 7 - Allow partitioning of MD devices NeilBrown
2004-01-23  0:14 ` [PATCH] md - 7 of 7 - Make sure md devices appear in /proc/partitions NeilBrown

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=E1Ajoxr-0000jH-00@notabene \
    --to=neilb@cse.unsw.edu.au \
    --cc=akpm@osdl.org \
    --cc=linux-raid@vger.kernel.org \
    /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