Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00fff265 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Jens Axboe
Browse files

block: remove q->prepare_flush_fn completely



This removes q->prepare_flush_fn completely (changes the
blk_queue_ordered API).

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent afc23068
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
 * blk_queue_ordered - does this queue support ordered writes
 * @q:        the request queue
 * @ordered:  one of QUEUE_ORDERED_*
 * @prepare_flush_fn: rq setup helper for cache flush ordered writes
 *
 * Description:
 *   For journalled file systems, doing ordered writes on a commit
@@ -22,8 +21,7 @@
 *   feature should call this function and indicate so.
 *
 **/
int blk_queue_ordered(struct request_queue *q, unsigned ordered,
		      prepare_flush_fn *prepare_flush_fn)
int blk_queue_ordered(struct request_queue *q, unsigned ordered)
{
	if (ordered != QUEUE_ORDERED_NONE &&
	    ordered != QUEUE_ORDERED_DRAIN &&
@@ -38,7 +36,6 @@ int blk_queue_ordered(struct request_queue *q, unsigned ordered,

	q->ordered = ordered;
	q->next_ordered = ordered;
	q->prepare_flush_fn = prepare_flush_fn;

	return 0;
}
@@ -140,8 +137,6 @@ static void queue_flush(struct request_queue *q, unsigned which)
	rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH;
	rq->rq_disk = q->bar_rq.rq_disk;
	rq->end_io = end_io;
	if (q->prepare_flush_fn)
		q->prepare_flush_fn(q, rq);

	elv_insert(q, rq, ELEVATOR_INSERT_FRONT);
}
+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ static struct brd_device *brd_alloc(int i)
	if (!brd->brd_queue)
		goto out_free_dev;
	blk_queue_make_request(brd->brd_queue, brd_make_request);
	blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG, NULL);
	blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG);
	blk_queue_max_hw_sectors(brd->brd_queue, 1024);
	blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY);

+1 −1
Original line number Diff line number Diff line
@@ -831,7 +831,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
	lo->lo_queue->unplug_fn = loop_unplug;

	if (!(lo_flags & LO_FLAGS_READ_ONLY) && file->f_op->fsync)
		blk_queue_ordered(lo->lo_queue, QUEUE_ORDERED_DRAIN, NULL);
		blk_queue_ordered(lo->lo_queue, QUEUE_ORDERED_DRAIN);

	set_capacity(lo->lo_disk, size);
	bd_set_size(bdev, size << 9);
+1 −1
Original line number Diff line number Diff line
@@ -439,7 +439,7 @@ static int osdblk_init_disk(struct osdblk_device *osdev)
	blk_queue_stack_limits(q, osd_request_queue(osdev->osd));

	blk_queue_prep_rq(q, blk_queue_start_tag);
	blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, NULL);
	blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH);

	disk->queue = q;

+1 −1
Original line number Diff line number Diff line
@@ -468,7 +468,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev)
	blk_queue_dma_alignment(queue, dev->blk_size-1);
	blk_queue_logical_block_size(queue, dev->blk_size);

	blk_queue_ordered(queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL);
	blk_queue_ordered(queue, QUEUE_ORDERED_DRAIN_FLUSH);

	blk_queue_max_segments(queue, -1);
	blk_queue_max_segment_size(queue, dev->bounce_size);
Loading