From 93f83c09e28815e2cc4afa1bca2fb83d031cdc4e Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 6 Feb 2008 01:40:00 -0800 Subject: [PATCH] --- yaml --- r: 83605 b: refs/heads/master c: 6ed3003c19a96fe18edf8179c4be6fe14abbebbc h: refs/heads/master i: 83603: d7677ba90871d3c3d14640cb9b71592b6e6c3ad2 v: v3 --- [refs] | 2 +- trunk/drivers/md/raid5.c | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 7c8fca668fc8..93d56a9e3273 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 73c34431c7119d0bc7d3436abfad75fe47b2c51f +refs/heads/master: 6ed3003c19a96fe18edf8179c4be6fe14abbebbc diff --git a/trunk/drivers/md/raid5.c b/trunk/drivers/md/raid5.c index 63bfb0757829..2d6f1a51359c 100644 --- a/trunk/drivers/md/raid5.c +++ b/trunk/drivers/md/raid5.c @@ -3159,7 +3159,8 @@ static void raid5_activate_delayed(raid5_conf_t *conf) atomic_inc(&conf->preread_active_stripes); list_add_tail(&sh->lru, &conf->handle_list); } - } + } else + blk_plug_device(conf->mddev->queue); } static void activate_bit_delay(raid5_conf_t *conf) @@ -3549,7 +3550,8 @@ static int make_request(struct request_queue *q, struct bio * bi) goto retry; } finish_wait(&conf->wait_for_overlap, &w); - handle_stripe(sh, NULL); + set_bit(STRIPE_HANDLE, &sh->state); + clear_bit(STRIPE_DELAYED, &sh->state); release_stripe(sh); } else { /* cannot get stripe for read-ahead, just give-up */ @@ -3892,7 +3894,7 @@ static int retry_aligned_read(raid5_conf_t *conf, struct bio *raid_bio) * During the scan, completed stripes are saved for us by the interrupt * handler, so that they will not have to wait for our next wakeup. */ -static void raid5d (mddev_t *mddev) +static void raid5d(mddev_t *mddev) { struct stripe_head *sh; raid5_conf_t *conf = mddev_to_conf(mddev); @@ -3917,12 +3919,6 @@ static void raid5d (mddev_t *mddev) activate_bit_delay(conf); } - if (list_empty(&conf->handle_list) && - atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD && - !blk_queue_plugged(mddev->queue) && - !list_empty(&conf->delayed_list)) - raid5_activate_delayed(conf); - while ((bio = remove_bio_from_retry(conf))) { int ok; spin_unlock_irq(&conf->device_lock);