File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -809,11 +809,15 @@ static void flush_pending_writes(struct r1conf *conf)
809
809
spin_lock_irq (& conf -> device_lock );
810
810
811
811
if (conf -> pending_bio_list .head ) {
812
+ struct blk_plug plug ;
812
813
struct bio * bio ;
814
+
813
815
bio = bio_list_get (& conf -> pending_bio_list );
814
816
conf -> pending_count = 0 ;
815
817
spin_unlock_irq (& conf -> device_lock );
818
+ blk_start_plug (& plug );
816
819
flush_bio_list (conf , bio );
820
+ blk_finish_plug (& plug );
817
821
} else
818
822
spin_unlock_irq (& conf -> device_lock );
819
823
}
Original file line number Diff line number Diff line change @@ -894,10 +894,13 @@ static void flush_pending_writes(struct r10conf *conf)
894
894
spin_lock_irq (& conf -> device_lock );
895
895
896
896
if (conf -> pending_bio_list .head ) {
897
+ struct blk_plug plug ;
897
898
struct bio * bio ;
899
+
898
900
bio = bio_list_get (& conf -> pending_bio_list );
899
901
conf -> pending_count = 0 ;
900
902
spin_unlock_irq (& conf -> device_lock );
903
+ blk_start_plug (& plug );
901
904
/* flush any pending bitmap writes to disk
902
905
* before proceeding w/ I/O */
903
906
bitmap_unplug (conf -> mddev -> bitmap );
@@ -918,6 +921,7 @@ static void flush_pending_writes(struct r10conf *conf)
918
921
generic_make_request (bio );
919
922
bio = next ;
920
923
}
924
+ blk_finish_plug (& plug );
921
925
} else
922
926
spin_unlock_irq (& conf -> device_lock );
923
927
}
You can’t perform that action at this time.
0 commit comments