linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: linux-raid@vger.kernel.org
Cc: Dan Williams <dan.j.williams@intel.com>, NeilBrown <neilb@suse.de>
Subject: [md PATCH 01/11] Revert "md: do not progress the resync process if the stripe was blocked"
Date: Fri, 16 Oct 2009 16:49:17 +1100	[thread overview]
Message-ID: <20091016054917.24208.31173.stgit@notabene.brown> (raw)
In-Reply-To: <20091016054316.24208.33818.stgit@notabene.brown>

This reverts commit df10cfbc4d7ab93260d997df754219d390d62a9d.

This patch was based on a misunderstanding and risks introducing a busy-wait loop.
So revert it.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
---

 drivers/md/raid5.c |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 9482980..ec14ff5 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2896,7 +2896,7 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
  *
  */
 
-static bool handle_stripe5(struct stripe_head *sh)
+static void handle_stripe5(struct stripe_head *sh)
 {
 	raid5_conf_t *conf = sh->raid_conf;
 	int disks = sh->disks, i;
@@ -3167,11 +3167,9 @@ static bool handle_stripe5(struct stripe_head *sh)
 	ops_run_io(sh, &s);
 
 	return_io(return_bi);
-
-	return blocked_rdev == NULL;
 }
 
-static bool handle_stripe6(struct stripe_head *sh)
+static void handle_stripe6(struct stripe_head *sh)
 {
 	raid5_conf_t *conf = sh->raid_conf;
 	int disks = sh->disks;
@@ -3455,17 +3453,14 @@ static bool handle_stripe6(struct stripe_head *sh)
 	ops_run_io(sh, &s);
 
 	return_io(return_bi);
-
-	return blocked_rdev == NULL;
 }
 
-/* returns true if the stripe was handled */
-static bool handle_stripe(struct stripe_head *sh)
+static void handle_stripe(struct stripe_head *sh)
 {
 	if (sh->raid_conf->level == 6)
-		return handle_stripe6(sh);
+		handle_stripe6(sh);
 	else
-		return handle_stripe5(sh);
+		handle_stripe5(sh);
 }
 
 static void raid5_activate_delayed(raid5_conf_t *conf)
@@ -4277,9 +4272,7 @@ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *ski
 	clear_bit(STRIPE_INSYNC, &sh->state);
 	spin_unlock(&sh->lock);
 
-	/* wait for any blocked device to be handled */
-	while (unlikely(!handle_stripe(sh)))
-		;
+	handle_stripe(sh);
 	release_stripe(sh);
 
 	return STRIPE_SECTORS;



  reply	other threads:[~2009-10-16  5:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16  5:49 [md PATCH 00/11] Series short description NeilBrown
2009-10-16  5:49 ` NeilBrown [this message]
2009-10-16  5:49 ` [md PATCH 03/11] md/raid5: initialize conf->device_lock earlier NeilBrown
2009-10-16  5:49 ` [md PATCH 02/11] md/raid1/raid10: add a cond_resched NeilBrown
2009-10-16  5:49 ` [md PATCH 05/11] md: remove clumsy usage of do_sync_mapping_range from bitmap code NeilBrown
2009-10-16  5:49 ` [md PATCH 04/11] md: raid1/raid10: handle allocation errors during array setup NeilBrown
2009-10-16  5:49 ` [md PATCH 06/11] md: drivers/md/unroll.pl replaced with awk analog NeilBrown
2009-10-16  5:49 ` [md PATCH 11/11] raid6/async_tx: handle holes in block list in async_syndrome_val NeilBrown
2009-10-16  5:49 ` [md PATCH 08/11] md: fix problems with RAID6 calculations for DDF NeilBrown
2009-10-16  5:49 ` [md PATCH 09/11] md: Fix handling of raid5 array which is being reshaped to fewer devices NeilBrown
2009-10-16  5:49 ` [md PATCH 10/11] md/async: don't pass a memory pointer as a page pointer NeilBrown
2009-10-16  5:49 ` [md PATCH 07/11] md/raid456: downlevel multicore operations to raid_run_ops 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=20091016054917.24208.31173.stgit@notabene.brown \
    --to=neilb@suse.de \
    --cc=dan.j.williams@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).