aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-06-01 05:37:33 -0400
committerNeilBrown <neilb@suse.de>2010-07-25 23:21:32 -0400
commitb63d7c2e29bf9cc94989806f2df0cfca4976b830 (patch)
treefdb82527ca458769d3c7381375873931bfb23b19 /drivers/md/bitmap.c
parent5ff5afffe6527543866a47ffab12769427283917 (diff)
md/bitmap: clean up plugging calls.
1/ use md_unplug in bitmap.c as we will soon be using bitmaps under arrays with no queue attached. 2/ Don't bother plugging the queue when we set a bit in the bitmap. The reason for this was to encourage as many bits as possible to get set before we unplug and write stuff out. However every personality already plugs the queue after bitmap_startwrite either directly (raid1/raid10) or be setting STRIPE_BIT_DELAY which causes the queue to be plugged later (raid5). Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 8af4d655b2d3..3f04699725db 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1296,7 +1296,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect
1296 prepare_to_wait(&bitmap->overflow_wait, &__wait, 1296 prepare_to_wait(&bitmap->overflow_wait, &__wait,
1297 TASK_UNINTERRUPTIBLE); 1297 TASK_UNINTERRUPTIBLE);
1298 spin_unlock_irq(&bitmap->lock); 1298 spin_unlock_irq(&bitmap->lock);
1299 blk_unplug(bitmap->mddev->queue); 1299 md_unplug(bitmap->mddev);
1300 schedule(); 1300 schedule();
1301 finish_wait(&bitmap->overflow_wait, &__wait); 1301 finish_wait(&bitmap->overflow_wait, &__wait);
1302 continue; 1302 continue;
@@ -1306,7 +1306,6 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect
1306 case 0: 1306 case 0:
1307 bitmap_file_set_bit(bitmap, offset); 1307 bitmap_file_set_bit(bitmap, offset);
1308 bitmap_count_page(bitmap, offset, 1); 1308 bitmap_count_page(bitmap, offset, 1);
1309 blk_plug_device_unlocked(bitmap->mddev->queue);
1310 /* fall through */ 1309 /* fall through */
1311 case 1: 1310 case 1:
1312 *bmc = 2; 1311 *bmc = 2;