diff options
-rw-r--r-- | block/blk-barrier.c | 7 | ||||
-rw-r--r-- | drivers/block/brd.c | 2 | ||||
-rw-r--r-- | drivers/block/loop.c | 2 | ||||
-rw-r--r-- | drivers/block/osdblk.c | 2 | ||||
-rw-r--r-- | drivers/block/ps3disk.c | 2 | ||||
-rw-r--r-- | drivers/block/virtio_blk.c | 4 | ||||
-rw-r--r-- | drivers/block/xen-blkfront.c | 3 | ||||
-rw-r--r-- | drivers/ide/ide-disk.c | 2 | ||||
-rw-r--r-- | drivers/md/dm.c | 2 | ||||
-rw-r--r-- | drivers/mmc/card/queue.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 4 |
13 files changed, 14 insertions, 22 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index 7ce0a32a21fd..eefbde835308 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * blk_queue_ordered - does this queue support ordered writes | 13 | * blk_queue_ordered - does this queue support ordered writes |
14 | * @q: the request queue | 14 | * @q: the request queue |
15 | * @ordered: one of QUEUE_ORDERED_* | 15 | * @ordered: one of QUEUE_ORDERED_* |
16 | * @prepare_flush_fn: rq setup helper for cache flush ordered writes | ||
17 | * | 16 | * |
18 | * Description: | 17 | * Description: |
19 | * For journalled file systems, doing ordered writes on a commit | 18 | * For journalled file systems, doing ordered writes on a commit |
@@ -22,8 +21,7 @@ | |||
22 | * feature should call this function and indicate so. | 21 | * feature should call this function and indicate so. |
23 | * | 22 | * |
24 | **/ | 23 | **/ |
25 | int blk_queue_ordered(struct request_queue *q, unsigned ordered, | 24 | int blk_queue_ordered(struct request_queue *q, unsigned ordered) |
26 | prepare_flush_fn *prepare_flush_fn) | ||
27 | { | 25 | { |
28 | if (ordered != QUEUE_ORDERED_NONE && | 26 | if (ordered != QUEUE_ORDERED_NONE && |
29 | ordered != QUEUE_ORDERED_DRAIN && | 27 | ordered != QUEUE_ORDERED_DRAIN && |
@@ -38,7 +36,6 @@ int blk_queue_ordered(struct request_queue *q, unsigned ordered, | |||
38 | 36 | ||
39 | q->ordered = ordered; | 37 | q->ordered = ordered; |
40 | q->next_ordered = ordered; | 38 | q->next_ordered = ordered; |
41 | q->prepare_flush_fn = prepare_flush_fn; | ||
42 | 39 | ||
43 | return 0; | 40 | return 0; |
44 | } | 41 | } |
@@ -140,8 +137,6 @@ static void queue_flush(struct request_queue *q, unsigned which) | |||
140 | rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH; | 137 | rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH; |
141 | rq->rq_disk = q->bar_rq.rq_disk; | 138 | rq->rq_disk = q->bar_rq.rq_disk; |
142 | rq->end_io = end_io; | 139 | rq->end_io = end_io; |
143 | if (q->prepare_flush_fn) | ||
144 | q->prepare_flush_fn(q, rq); | ||
145 | 140 | ||
146 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); | 141 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); |
147 | } | 142 | } |
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 1b218c6b6820..1d2c18620f9a 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -479,7 +479,7 @@ static struct brd_device *brd_alloc(int i) | |||
479 | if (!brd->brd_queue) | 479 | if (!brd->brd_queue) |
480 | goto out_free_dev; | 480 | goto out_free_dev; |
481 | blk_queue_make_request(brd->brd_queue, brd_make_request); | 481 | blk_queue_make_request(brd->brd_queue, brd_make_request); |
482 | blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG, NULL); | 482 | blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG); |
483 | blk_queue_max_hw_sectors(brd->brd_queue, 1024); | 483 | blk_queue_max_hw_sectors(brd->brd_queue, 1024); |
484 | blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY); | 484 | blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY); |
485 | 485 | ||
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index fedfdb7d3cdf..d285a5481965 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -831,7 +831,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, | |||
831 | lo->lo_queue->unplug_fn = loop_unplug; | 831 | lo->lo_queue->unplug_fn = loop_unplug; |
832 | 832 | ||
833 | if (!(lo_flags & LO_FLAGS_READ_ONLY) && file->f_op->fsync) | 833 | if (!(lo_flags & LO_FLAGS_READ_ONLY) && file->f_op->fsync) |
834 | blk_queue_ordered(lo->lo_queue, QUEUE_ORDERED_DRAIN, NULL); | 834 | blk_queue_ordered(lo->lo_queue, QUEUE_ORDERED_DRAIN); |
835 | 835 | ||
836 | set_capacity(lo->lo_disk, size); | 836 | set_capacity(lo->lo_disk, size); |
837 | bd_set_size(bdev, size << 9); | 837 | bd_set_size(bdev, size << 9); |
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c index 9639565a9a6a..2284b4f05c62 100644 --- a/drivers/block/osdblk.c +++ b/drivers/block/osdblk.c | |||
@@ -439,7 +439,7 @@ static int osdblk_init_disk(struct osdblk_device *osdev) | |||
439 | blk_queue_stack_limits(q, osd_request_queue(osdev->osd)); | 439 | blk_queue_stack_limits(q, osd_request_queue(osdev->osd)); |
440 | 440 | ||
441 | blk_queue_prep_rq(q, blk_queue_start_tag); | 441 | blk_queue_prep_rq(q, blk_queue_start_tag); |
442 | blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, NULL); | 442 | blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH); |
443 | 443 | ||
444 | disk->queue = q; | 444 | disk->queue = q; |
445 | 445 | ||
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c index ab528a480f98..e9da874d0419 100644 --- a/drivers/block/ps3disk.c +++ b/drivers/block/ps3disk.c | |||
@@ -468,7 +468,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev) | |||
468 | blk_queue_dma_alignment(queue, dev->blk_size-1); | 468 | blk_queue_dma_alignment(queue, dev->blk_size-1); |
469 | blk_queue_logical_block_size(queue, dev->blk_size); | 469 | blk_queue_logical_block_size(queue, dev->blk_size); |
470 | 470 | ||
471 | blk_queue_ordered(queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL); | 471 | blk_queue_ordered(queue, QUEUE_ORDERED_DRAIN_FLUSH); |
472 | 472 | ||
473 | blk_queue_max_segments(queue, -1); | 473 | blk_queue_max_segments(queue, -1); |
474 | blk_queue_max_segment_size(queue, dev->bounce_size); | 474 | blk_queue_max_segment_size(queue, dev->bounce_size); |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index b277f9e6abac..0a3222fd4442 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -366,9 +366,9 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
366 | 366 | ||
367 | /* If barriers are supported, tell block layer that queue is ordered */ | 367 | /* If barriers are supported, tell block layer that queue is ordered */ |
368 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_FLUSH)) | 368 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_FLUSH)) |
369 | blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, NULL); | 369 | blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH); |
370 | else if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) | 370 | else if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) |
371 | blk_queue_ordered(q, QUEUE_ORDERED_TAG, NULL); | 371 | blk_queue_ordered(q, QUEUE_ORDERED_TAG); |
372 | 372 | ||
373 | /* If disk is read-only in the host, the guest should obey */ | 373 | /* If disk is read-only in the host, the guest should obey */ |
374 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) | 374 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) |
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 495533e66542..76af65b654e3 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -373,8 +373,7 @@ static int xlvbd_barrier(struct blkfront_info *info) | |||
373 | int err; | 373 | int err; |
374 | 374 | ||
375 | err = blk_queue_ordered(info->rq, | 375 | err = blk_queue_ordered(info->rq, |
376 | info->feature_barrier ? QUEUE_ORDERED_DRAIN : QUEUE_ORDERED_NONE, | 376 | info->feature_barrier ? QUEUE_ORDERED_DRAIN : QUEUE_ORDERED_NONE); |
377 | NULL); | ||
378 | 377 | ||
379 | if (err) | 378 | if (err) |
380 | return err; | 379 | return err; |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index c22e6226e9e9..7433e07de30e 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -549,7 +549,7 @@ static void update_ordered(ide_drive_t *drive) | |||
549 | } else | 549 | } else |
550 | ordered = QUEUE_ORDERED_DRAIN; | 550 | ordered = QUEUE_ORDERED_DRAIN; |
551 | 551 | ||
552 | blk_queue_ordered(drive->queue, ordered, NULL); | 552 | blk_queue_ordered(drive->queue, ordered); |
553 | } | 553 | } |
554 | 554 | ||
555 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); | 555 | ide_devset_get_flag(wcache, IDE_DFLAG_WCACHE); |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 00c810551814..d505a96845c1 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1901,7 +1901,7 @@ static struct mapped_device *alloc_dev(int minor) | |||
1901 | blk_queue_softirq_done(md->queue, dm_softirq_done); | 1901 | blk_queue_softirq_done(md->queue, dm_softirq_done); |
1902 | blk_queue_prep_rq(md->queue, dm_prep_fn); | 1902 | blk_queue_prep_rq(md->queue, dm_prep_fn); |
1903 | blk_queue_lld_busy(md->queue, dm_lld_busy); | 1903 | blk_queue_lld_busy(md->queue, dm_lld_busy); |
1904 | blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL); | 1904 | blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH); |
1905 | 1905 | ||
1906 | md->disk = alloc_disk(1); | 1906 | md->disk = alloc_disk(1); |
1907 | if (!md->disk) | 1907 | if (!md->disk) |
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index ec92bcbdeddb..c77eb49eda0e 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -128,7 +128,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock | |||
128 | mq->req = NULL; | 128 | mq->req = NULL; |
129 | 129 | ||
130 | blk_queue_prep_rq(mq->queue, mmc_prep_request); | 130 | blk_queue_prep_rq(mq->queue, mmc_prep_request); |
131 | blk_queue_ordered(mq->queue, QUEUE_ORDERED_DRAIN, NULL); | 131 | blk_queue_ordered(mq->queue, QUEUE_ORDERED_DRAIN); |
132 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, mq->queue); | 132 | queue_flag_set_unlocked(QUEUE_FLAG_NONROT, mq->queue); |
133 | 133 | ||
134 | #ifdef CONFIG_MMC_BLOCK_BOUNCE | 134 | #ifdef CONFIG_MMC_BLOCK_BOUNCE |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 33975e922d65..17b033d0e050 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -2196,7 +2196,7 @@ static void dasd_setup_queue(struct dasd_block *block) | |||
2196 | */ | 2196 | */ |
2197 | blk_queue_max_segment_size(block->request_queue, PAGE_SIZE); | 2197 | blk_queue_max_segment_size(block->request_queue, PAGE_SIZE); |
2198 | blk_queue_segment_boundary(block->request_queue, PAGE_SIZE - 1); | 2198 | blk_queue_segment_boundary(block->request_queue, PAGE_SIZE - 1); |
2199 | blk_queue_ordered(block->request_queue, QUEUE_ORDERED_DRAIN, NULL); | 2199 | blk_queue_ordered(block->request_queue, QUEUE_ORDERED_DRAIN); |
2200 | } | 2200 | } |
2201 | 2201 | ||
2202 | /* | 2202 | /* |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e8c295e01466..d9a4314a1948 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2135,7 +2135,7 @@ static int sd_revalidate_disk(struct gendisk *disk) | |||
2135 | else | 2135 | else |
2136 | ordered = QUEUE_ORDERED_DRAIN; | 2136 | ordered = QUEUE_ORDERED_DRAIN; |
2137 | 2137 | ||
2138 | blk_queue_ordered(sdkp->disk->queue, ordered, NULL); | 2138 | blk_queue_ordered(sdkp->disk->queue, ordered); |
2139 | 2139 | ||
2140 | set_capacity(disk, sdkp->capacity); | 2140 | set_capacity(disk, sdkp->capacity); |
2141 | kfree(buffer); | 2141 | kfree(buffer); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 6bba04c7ec48..3a2c5d9a9288 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -212,7 +212,6 @@ struct bvec_merge_data { | |||
212 | }; | 212 | }; |
213 | typedef int (merge_bvec_fn) (struct request_queue *, struct bvec_merge_data *, | 213 | typedef int (merge_bvec_fn) (struct request_queue *, struct bvec_merge_data *, |
214 | struct bio_vec *); | 214 | struct bio_vec *); |
215 | typedef void (prepare_flush_fn) (struct request_queue *, struct request *); | ||
216 | typedef void (softirq_done_fn)(struct request *); | 215 | typedef void (softirq_done_fn)(struct request *); |
217 | typedef int (dma_drain_needed_fn)(struct request *); | 216 | typedef int (dma_drain_needed_fn)(struct request *); |
218 | typedef int (lld_busy_fn) (struct request_queue *q); | 217 | typedef int (lld_busy_fn) (struct request_queue *q); |
@@ -286,7 +285,6 @@ struct request_queue | |||
286 | unprep_rq_fn *unprep_rq_fn; | 285 | unprep_rq_fn *unprep_rq_fn; |
287 | unplug_fn *unplug_fn; | 286 | unplug_fn *unplug_fn; |
288 | merge_bvec_fn *merge_bvec_fn; | 287 | merge_bvec_fn *merge_bvec_fn; |
289 | prepare_flush_fn *prepare_flush_fn; | ||
290 | softirq_done_fn *softirq_done_fn; | 288 | softirq_done_fn *softirq_done_fn; |
291 | rq_timed_out_fn *rq_timed_out_fn; | 289 | rq_timed_out_fn *rq_timed_out_fn; |
292 | dma_drain_needed_fn *dma_drain_needed; | 290 | dma_drain_needed_fn *dma_drain_needed; |
@@ -896,7 +894,7 @@ extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *); | |||
896 | extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); | 894 | extern void blk_queue_rq_timed_out(struct request_queue *, rq_timed_out_fn *); |
897 | extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); | 895 | extern void blk_queue_rq_timeout(struct request_queue *, unsigned int); |
898 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 896 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
899 | extern int blk_queue_ordered(struct request_queue *, unsigned, prepare_flush_fn *); | 897 | extern int blk_queue_ordered(struct request_queue *, unsigned); |
900 | extern bool blk_do_ordered(struct request_queue *, struct request **); | 898 | extern bool blk_do_ordered(struct request_queue *, struct request **); |
901 | extern unsigned blk_ordered_cur_seq(struct request_queue *); | 899 | extern unsigned blk_ordered_cur_seq(struct request_queue *); |
902 | extern unsigned blk_ordered_req_seq(struct request *); | 900 | extern unsigned blk_ordered_req_seq(struct request *); |