diff options
author | Alan D. Brunelle <Alan.Brunelle@hp.com> | 2007-11-07 14:26:56 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-11-09 07:41:32 -0500 |
commit | 2ad8b1ef11c98c5603580878aebf9f1bc74129e4 (patch) | |
tree | f7bdc2484513f6ffd174b1385bb216dcf97d2c78 /drivers/md | |
parent | d85532ed284e63b5c56eaf2418f262822af60be4 (diff) |
Add UNPLUG traces to all appropriate places
Added blk_unplug interface, allowing all invocations of unplugs to result
in a generated blktrace UNPLUG.
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bitmap.c | 3 | ||||
-rw-r--r-- | drivers/md/dm-table.c | 3 | ||||
-rw-r--r-- | drivers/md/linear.c | 3 | ||||
-rw-r--r-- | drivers/md/md.c | 4 | ||||
-rw-r--r-- | drivers/md/multipath.c | 3 | ||||
-rw-r--r-- | drivers/md/raid0.c | 3 | ||||
-rw-r--r-- | drivers/md/raid1.c | 3 | ||||
-rw-r--r-- | drivers/md/raid10.c | 3 | ||||
-rw-r--r-- | drivers/md/raid5.c | 3 |
9 files changed, 10 insertions, 18 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 7c426d07a555..1b1ef3130e6e 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -1207,8 +1207,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect | |||
1207 | prepare_to_wait(&bitmap->overflow_wait, &__wait, | 1207 | prepare_to_wait(&bitmap->overflow_wait, &__wait, |
1208 | TASK_UNINTERRUPTIBLE); | 1208 | TASK_UNINTERRUPTIBLE); |
1209 | spin_unlock_irq(&bitmap->lock); | 1209 | spin_unlock_irq(&bitmap->lock); |
1210 | bitmap->mddev->queue | 1210 | blk_unplug(bitmap->mddev->queue); |
1211 | ->unplug_fn(bitmap->mddev->queue); | ||
1212 | schedule(); | 1211 | schedule(); |
1213 | finish_wait(&bitmap->overflow_wait, &__wait); | 1212 | finish_wait(&bitmap->overflow_wait, &__wait); |
1214 | continue; | 1213 | continue; |
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 5a7eb650181e..e298d8d11f24 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -1000,8 +1000,7 @@ void dm_table_unplug_all(struct dm_table *t) | |||
1000 | struct dm_dev *dd = list_entry(d, struct dm_dev, list); | 1000 | struct dm_dev *dd = list_entry(d, struct dm_dev, list); |
1001 | struct request_queue *q = bdev_get_queue(dd->bdev); | 1001 | struct request_queue *q = bdev_get_queue(dd->bdev); |
1002 | 1002 | ||
1003 | if (q->unplug_fn) | 1003 | blk_unplug(q); |
1004 | q->unplug_fn(q); | ||
1005 | } | 1004 | } |
1006 | } | 1005 | } |
1007 | 1006 | ||
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 56a11f6c127b..3dac1cfb8189 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -87,8 +87,7 @@ static void linear_unplug(struct request_queue *q) | |||
87 | 87 | ||
88 | for (i=0; i < mddev->raid_disks; i++) { | 88 | for (i=0; i < mddev->raid_disks; i++) { |
89 | struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev); | 89 | struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev); |
90 | if (r_queue->unplug_fn) | 90 | blk_unplug(r_queue); |
91 | r_queue->unplug_fn(r_queue); | ||
92 | } | 91 | } |
93 | } | 92 | } |
94 | 93 | ||
diff --git a/drivers/md/md.c b/drivers/md/md.c index 808cd9549456..cef9ebd5a046 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5445,7 +5445,7 @@ void md_do_sync(mddev_t *mddev) | |||
5445 | * about not overloading the IO subsystem. (things like an | 5445 | * about not overloading the IO subsystem. (things like an |
5446 | * e2fsck being done on the RAID array should execute fast) | 5446 | * e2fsck being done on the RAID array should execute fast) |
5447 | */ | 5447 | */ |
5448 | mddev->queue->unplug_fn(mddev->queue); | 5448 | blk_unplug(mddev->queue); |
5449 | cond_resched(); | 5449 | cond_resched(); |
5450 | 5450 | ||
5451 | currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 | 5451 | currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 |
@@ -5464,7 +5464,7 @@ void md_do_sync(mddev_t *mddev) | |||
5464 | * this also signals 'finished resyncing' to md_stop | 5464 | * this also signals 'finished resyncing' to md_stop |
5465 | */ | 5465 | */ |
5466 | out: | 5466 | out: |
5467 | mddev->queue->unplug_fn(mddev->queue); | 5467 | blk_unplug(mddev->queue); |
5468 | 5468 | ||
5469 | wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active)); | 5469 | wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active)); |
5470 | 5470 | ||
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index b35731cceac6..eb631ebed686 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -125,8 +125,7 @@ static void unplug_slaves(mddev_t *mddev) | |||
125 | atomic_inc(&rdev->nr_pending); | 125 | atomic_inc(&rdev->nr_pending); |
126 | rcu_read_unlock(); | 126 | rcu_read_unlock(); |
127 | 127 | ||
128 | if (r_queue->unplug_fn) | 128 | blk_unplug(r_queue); |
129 | r_queue->unplug_fn(r_queue); | ||
130 | 129 | ||
131 | rdev_dec_pending(rdev, mddev); | 130 | rdev_dec_pending(rdev, mddev); |
132 | rcu_read_lock(); | 131 | rcu_read_lock(); |
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index c111105fc2dc..f8e591708d1f 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -35,8 +35,7 @@ static void raid0_unplug(struct request_queue *q) | |||
35 | for (i=0; i<mddev->raid_disks; i++) { | 35 | for (i=0; i<mddev->raid_disks; i++) { |
36 | struct request_queue *r_queue = bdev_get_queue(devlist[i]->bdev); | 36 | struct request_queue *r_queue = bdev_get_queue(devlist[i]->bdev); |
37 | 37 | ||
38 | if (r_queue->unplug_fn) | 38 | blk_unplug(r_queue); |
39 | r_queue->unplug_fn(r_queue); | ||
40 | } | 39 | } |
41 | } | 40 | } |
42 | 41 | ||
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 85478d6a9c1a..4a69c416e045 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -549,8 +549,7 @@ static void unplug_slaves(mddev_t *mddev) | |||
549 | atomic_inc(&rdev->nr_pending); | 549 | atomic_inc(&rdev->nr_pending); |
550 | rcu_read_unlock(); | 550 | rcu_read_unlock(); |
551 | 551 | ||
552 | if (r_queue->unplug_fn) | 552 | blk_unplug(r_queue); |
553 | r_queue->unplug_fn(r_queue); | ||
554 | 553 | ||
555 | rdev_dec_pending(rdev, mddev); | 554 | rdev_dec_pending(rdev, mddev); |
556 | rcu_read_lock(); | 555 | rcu_read_lock(); |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index fc6607acb6e4..5cdcc9386200 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -593,8 +593,7 @@ static void unplug_slaves(mddev_t *mddev) | |||
593 | atomic_inc(&rdev->nr_pending); | 593 | atomic_inc(&rdev->nr_pending); |
594 | rcu_read_unlock(); | 594 | rcu_read_unlock(); |
595 | 595 | ||
596 | if (r_queue->unplug_fn) | 596 | blk_unplug(r_queue); |
597 | r_queue->unplug_fn(r_queue); | ||
598 | 597 | ||
599 | rdev_dec_pending(rdev, mddev); | 598 | rdev_dec_pending(rdev, mddev); |
600 | rcu_read_lock(); | 599 | rcu_read_lock(); |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 82af3465a900..1cfc984cc7b7 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -3186,8 +3186,7 @@ static void unplug_slaves(mddev_t *mddev) | |||
3186 | atomic_inc(&rdev->nr_pending); | 3186 | atomic_inc(&rdev->nr_pending); |
3187 | rcu_read_unlock(); | 3187 | rcu_read_unlock(); |
3188 | 3188 | ||
3189 | if (r_queue->unplug_fn) | 3189 | blk_unplug(r_queue); |
3190 | r_queue->unplug_fn(r_queue); | ||
3191 | 3190 | ||
3192 | rdev_dec_pending(rdev, mddev); | 3191 | rdev_dec_pending(rdev, mddev); |
3193 | rcu_read_lock(); | 3192 | rcu_read_lock(); |