aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
1516 conf_t *conf = mddev->private; 1516 conf_t *conf = mddev->private;
1517 struct list_head *head = &conf->retry_list; 1517 struct list_head *head = &conf->retry_list;
1518 mdk_rdev_t *rdev; 1518 mdk_rdev_t *rdev;
1519 struct blk_plug plug;
1519 1520
1520 md_check_recovery(mddev); 1521 md_check_recovery(mddev);
1521 1522
1523 blk_start_plug(&plug);
1522 for (;;) { 1524 for (;;) {
1523 char b[BDEVNAME_SIZE]; 1525 char b[BDEVNAME_SIZE];
1524 1526
@@ -1593,6 +1595,7 @@ static void raid1d(mddev_t *mddev)
1593 } 1595 }
1594 cond_resched(); 1596 cond_resched();
1595 } 1597 }
1598 blk_finish_plug(&plug);
1596} 1599}
1597 1600
1598 1601
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)
1640 conf_t *conf = mddev->private; 1640 conf_t *conf = mddev->private;
1641 struct list_head *head = &conf->retry_list; 1641 struct list_head *head = &conf->retry_list;
1642 mdk_rdev_t *rdev; 1642 mdk_rdev_t *rdev;
1643 struct blk_plug plug;
1643 1644
1644 md_check_recovery(mddev); 1645 md_check_recovery(mddev);
1645 1646
1647 blk_start_plug(&plug);
1646 for (;;) { 1648 for (;;) {
1647 char b[BDEVNAME_SIZE]; 1649 char b[BDEVNAME_SIZE];
1648 1650
@@ -1716,6 +1718,7 @@ static void raid10d(mddev_t *mddev)
1716 } 1718 }
1717 cond_resched(); 1719 cond_resched();
1718 } 1720 }
1721 blk_finish_plug(&plug);
1719} 1722}
1720 1723
1721 1724
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)
4478 struct stripe_head *sh; 4478 struct stripe_head *sh;
4479 raid5_conf_t *conf = mddev->private; 4479 raid5_conf_t *conf = mddev->private;
4480 int handled; 4480 int handled;
4481 struct blk_plug plug;
4481 4482
4482 pr_debug("+++ raid5d active\n"); 4483 pr_debug("+++ raid5d active\n");
4483 4484
4484 md_check_recovery(mddev); 4485 md_check_recovery(mddev);
4485 4486
4487 blk_start_plug(&plug);
4486 handled = 0; 4488 handled = 0;
4487 spin_lock_irq(&conf->device_lock); 4489 spin_lock_irq(&conf->device_lock);
4488 while (1) { 4490 while (1) {
@@ -4525,6 +4527,7 @@ static void raid5d(mddev_t *mddev)
4525 spin_unlock_irq(&conf->device_lock); 4527 spin_unlock_irq(&conf->device_lock);
4526 4528
4527 async_tx_issue_pending_all(); 4529 async_tx_issue_pending_all();
4530 blk_finish_plug(&plug);
4528 4531
4529 pr_debug("--- raid5d inactive\n"); 4532 pr_debug("--- raid5d inactive\n");
4530} 4533}