Commit 0b0bcacc authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: don't bother with bounce limits for make_request drivers



We only call blk_queue_bounce for request-based drivers, so stop messing
with it for make_request based drivers.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1c4bc3ab
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -989,6 +989,11 @@ int blk_init_allocated_queue(struct request_queue *q)
	 */
	blk_queue_make_request(q, blk_queue_bio);

	/*
	 * by default assume old behaviour and bounce for any highmem page
	 */
	blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);

	q->sg_reserved_size = INT_MAX;

	/* Protect q->elevator from elevator_change */
+5 −0
Original line number Diff line number Diff line
@@ -2349,6 +2349,11 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,

	blk_queue_make_request(q, blk_mq_make_request);

	/*
	 * by default assume old behaviour and bounce for any highmem page
	 */
	blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);

	/*
	 * Do this after blk_queue_make_request() overrides it...
	 */
+0 −5
Original line number Diff line number Diff line
@@ -172,11 +172,6 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
	q->nr_batching = BLK_BATCH_REQ;

	blk_set_default_limits(&q->limits);

	/*
	 * by default assume old behaviour and bounce for any highmem page
	 */
	blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
}
EXPORT_SYMBOL(blk_queue_make_request);

+0 −1
Original line number Diff line number Diff line
@@ -418,7 +418,6 @@ static struct brd_device *brd_alloc(int i)

	blk_queue_make_request(brd->brd_queue, brd_make_request);
	blk_queue_max_hw_sectors(brd->brd_queue, 1024);
	blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY);

	/* This is so fdisk will align partitions on 4k, because of
	 * direct_access API needing 4k alignment, returning a PFN
+0 −1
Original line number Diff line number Diff line
@@ -2850,7 +2850,6 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
	/* Setting the max_hw_sectors to an odd value of 8kibyte here
	   This triggers a max_bio_size message upon first attach or connect */
	blk_queue_max_hw_sectors(q, DRBD_MAX_BIO_SIZE_SAFE >> 8);
	blk_queue_bounce_limit(q, BLK_BOUNCE_ANY);
	q->queue_lock = &resource->req_lock;

	device->md_io.page = alloc_page(GFP_KERNEL);
Loading