From: NeilBrown <neilb@suse.de>
Date: Wed, 27 Oct 2010 04:37:41 +0000 (+1100)
Subject: md: unplug writes to external bitmaps.
X-Git-Tag: firefly_0821_release~7613^2~3566^2~3
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=be2a2656eef95c32ca73e7a6a8c85671aa92e3f1;p=firefly-linux-kernel-4.4.55.git

md: unplug writes to external bitmaps.

When writing to an 'external' bitmap we don't currently unplug the
device before waiting, so we can get a 3msec delay each time;
So use REQ_UNPLUG to force and unplug.

Signed-off-by: NeilBrown <neilb@suse.de>
---

diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index fdde0279755f..5a1ffe3527aa 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -343,7 +343,7 @@ static void write_page(struct bitmap *bitmap, struct page *page, int wait)
 			atomic_inc(&bitmap->pending_writes);
 			set_buffer_locked(bh);
 			set_buffer_mapped(bh);
-			submit_bh(WRITE, bh);
+			submit_bh(WRITE | REQ_UNPLUG | REQ_SYNC, bh);
 			bh = bh->b_this_page;
 		}