aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 818313e277e7..86ba66c0b28a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -780,8 +780,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
780 bio->bi_end_io = super_written; 780 bio->bi_end_io = super_written;
781 781
782 atomic_inc(&mddev->pending_writes); 782 atomic_inc(&mddev->pending_writes);
783 submit_bio(REQ_WRITE | REQ_SYNC | REQ_UNPLUG | REQ_FLUSH | REQ_FUA, 783 submit_bio(REQ_WRITE | REQ_SYNC | REQ_FLUSH | REQ_FUA, bio);
784 bio);
785} 784}
786 785
787void md_super_wait(mddev_t *mddev) 786void md_super_wait(mddev_t *mddev)
@@ -809,7 +808,7 @@ int sync_page_io(mdk_rdev_t *rdev, sector_t sector, int size,
809 struct completion event; 808 struct completion event;
810 int ret; 809 int ret;
811 810
812 rw |= REQ_SYNC | REQ_UNPLUG; 811 rw |= REQ_SYNC;
813 812
814 bio->bi_bdev = (metadata_op && rdev->meta_bdev) ? 813 bio->bi_bdev = (metadata_op && rdev->meta_bdev) ?
815 rdev->meta_bdev : rdev->bdev; 814 rdev->meta_bdev : rdev->bdev;
@@ -4817,7 +4816,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
4817 __md_stop_writes(mddev); 4816 __md_stop_writes(mddev);
4818 md_stop(mddev); 4817 md_stop(mddev);
4819 mddev->queue->merge_bvec_fn = NULL; 4818 mddev->queue->merge_bvec_fn = NULL;
4820 mddev->queue->unplug_fn = NULL;
4821 mddev->queue->backing_dev_info.congested_fn = NULL; 4819 mddev->queue->backing_dev_info.congested_fn = NULL;
4822 4820
4823 /* tell userspace to handle 'inactive' */ 4821 /* tell userspace to handle 'inactive' */
@@ -6692,8 +6690,6 @@ EXPORT_SYMBOL_GPL(md_allow_write);
6692 6690
6693void md_unplug(mddev_t *mddev) 6691void md_unplug(mddev_t *mddev)
6694{ 6692{
6695 if (mddev->queue)
6696 blk_unplug(mddev->queue);
6697 if (mddev->plug) 6693 if (mddev->plug)
6698 mddev->plug->unplug_fn(mddev->plug); 6694 mddev->plug->unplug_fn(mddev->plug);
6699} 6695}
@@ -6876,7 +6872,6 @@ void md_do_sync(mddev_t *mddev)
6876 >= mddev->resync_max - mddev->curr_resync_completed 6872 >= mddev->resync_max - mddev->curr_resync_completed
6877 )) { 6873 )) {
6878 /* time to update curr_resync_completed */ 6874 /* time to update curr_resync_completed */
6879 md_unplug(mddev);
6880 wait_event(mddev->recovery_wait, 6875 wait_event(mddev->recovery_wait,
6881 atomic_read(&mddev->recovery_active) == 0); 6876 atomic_read(&mddev->recovery_active) == 0);
6882 mddev->curr_resync_completed = j; 6877 mddev->curr_resync_completed = j;
@@ -6952,7 +6947,6 @@ void md_do_sync(mddev_t *mddev)
6952 * about not overloading the IO subsystem. (things like an 6947 * about not overloading the IO subsystem. (things like an
6953 * e2fsck being done on the RAID array should execute fast) 6948 * e2fsck being done on the RAID array should execute fast)
6954 */ 6949 */
6955 md_unplug(mddev);
6956 cond_resched(); 6950 cond_resched();
6957 6951
6958 currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 6952 currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2
@@ -6971,8 +6965,6 @@ void md_do_sync(mddev_t *mddev)
6971 * this also signals 'finished resyncing' to md_stop 6965 * this also signals 'finished resyncing' to md_stop
6972 */ 6966 */
6973 out: 6967 out:
6974 md_unplug(mddev);
6975
6976 wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active)); 6968 wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active));
6977 6969
6978 /* tell personality that we are finished */ 6970 /* tell personality that we are finished */