diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:17:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-09 18:17:49 -0500 |
commit | 4c31c30302358ce1d253f915a064722db33c2114 (patch) | |
tree | f592738f7d3f1ed1640f28db6c2b987fc826ba65 /drivers | |
parent | c4888f9ffafe7db107b7eafb3a68eaeeff3779c3 (diff) | |
parent | 2ad8b1ef11c98c5603580878aebf9f1bc74129e4 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
Add UNPLUG traces to all appropriate places
block: fix requeue handling in blk_queue_invalidate_tags()
mmc: Fix sg helper copy-and-paste error
pktcdvd: fix BUG caused by sysfs module reference semantics change
ioprio: allow sys_ioprio_set() value of 0 to reset ioprio setting
cfq_idle_class_timer: add paranoid checks for jiffies overflow
cfq: fix IOPRIO_CLASS_IDLE delays
cfq: fix IOPRIO_CLASS_IDLE accounting
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/pktcdvd.c | 9 | ||||
-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 | ||||
-rw-r--r-- | drivers/mmc/card/queue.c | 2 |
11 files changed, 20 insertions, 19 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index a8130a4ad6d4..a5ee21319d37 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -358,10 +358,19 @@ static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf, | |||
358 | size_t count) | 358 | size_t count) |
359 | { | 359 | { |
360 | unsigned int major, minor; | 360 | unsigned int major, minor; |
361 | |||
361 | if (sscanf(buf, "%u:%u", &major, &minor) == 2) { | 362 | if (sscanf(buf, "%u:%u", &major, &minor) == 2) { |
363 | /* pkt_setup_dev() expects caller to hold reference to self */ | ||
364 | if (!try_module_get(THIS_MODULE)) | ||
365 | return -ENODEV; | ||
366 | |||
362 | pkt_setup_dev(MKDEV(major, minor), NULL); | 367 | pkt_setup_dev(MKDEV(major, minor), NULL); |
368 | |||
369 | module_put(THIS_MODULE); | ||
370 | |||
363 | return count; | 371 | return count; |
364 | } | 372 | } |
373 | |||
365 | return -EINVAL; | 374 | return -EINVAL; |
366 | } | 375 | } |
367 | 376 | ||
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(); |
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 9203a0b221b3..1b9c9b6da5b7 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -310,7 +310,7 @@ static void copy_sg(struct scatterlist *dst, unsigned int dst_len, | |||
310 | } | 310 | } |
311 | 311 | ||
312 | if (src_size == 0) { | 312 | if (src_size == 0) { |
313 | src_buf = sg_virt(dst); | 313 | src_buf = sg_virt(src); |
314 | src_size = src->length; | 314 | src_size = src->length; |
315 | } | 315 | } |
316 | 316 | ||