summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-04-18 12:25:41 +0400
committerNeilBrown <neilb@suse.de>2011-04-18 12:25:41 +0400
commite1dfa0a29737142c32f00a3bac0f609dc85b4a82 (patch)
tree1af906cc5e959803e7d5ea0e56fb69b56754501a
parent99e22598e9a8e0a996d69c8c0f6b7027cb57720a (diff)
downloadlinux-e1dfa0a29737142c32f00a3bac0f609dc85b4a82.tar.xz
md: use new plugging interface for RAID IO.
md/raid submits a lot of IO from the various raid threads. So adding start/finish plug calls to those so that some plugging happens. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--drivers/md/raid1.c5
-rw-r--r--drivers/md/raid10.c3
-rw-r--r--drivers/md/raid5.c3
3 files changed, 10 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index c2a21ae56d97..5449cd5e3141 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1516,9 +1516,11 @@ static void raid1d(mddev_t *mddev)
conf_t *conf = mddev->private;
struct list_head *head = &conf->retry_list;
mdk_rdev_t *rdev;
+ struct blk_plug plug;
md_check_recovery(mddev);
-
+
+ blk_start_plug(&plug);
for (;;) {
char b[BDEVNAME_SIZE];
@@ -1593,6 +1595,7 @@ static void raid1d(mddev_t *mddev)
}
cond_resched();
}
+ blk_finish_plug(&plug);
}
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 2da83d566592..c8e5dac5d695 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1640,9 +1640,11 @@ static void raid10d(mddev_t *mddev)
conf_t *conf = mddev->private;
struct list_head *head = &conf->retry_list;
mdk_rdev_t *rdev;
+ struct blk_plug plug;
md_check_recovery(mddev);
+ blk_start_plug(&plug);
for (;;) {
char b[BDEVNAME_SIZE];
@@ -1716,6 +1718,7 @@ static void raid10d(mddev_t *mddev)
}
cond_resched();
}
+ blk_finish_plug(&plug);
}
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index e867ee42b152..ce6960b1c682 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4478,11 +4478,13 @@ static void raid5d(mddev_t *mddev)
struct stripe_head *sh;
raid5_conf_t *conf = mddev->private;
int handled;
+ struct blk_plug plug;
pr_debug("+++ raid5d active\n");
md_check_recovery(mddev);
+ blk_start_plug(&plug);
handled = 0;
spin_lock_irq(&conf->device_lock);
while (1) {
@@ -4525,6 +4527,7 @@ static void raid5d(mddev_t *mddev)
spin_unlock_irq(&conf->device_lock);
async_tx_issue_pending_all();
+ blk_finish_plug(&plug);
pr_debug("--- raid5d inactive\n");
}