mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
blk: remove bio_set arg from blk_queue_split()
blk_queue_split() is always called with the last arg being q->bio_split, where 'q' is the first arg. Also blk_queue_split() sometimes uses the passed-in 'bs' and sometimes uses q->bio_split. This is inconsistent and unnecessary. Remove the last arg and always use q->bio_split inside blk_queue_split() Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Credit-to: Javier González <jg@lightnvm.io> (Noticed that lightnvm was missed) Reviewed-by: Javier González <javier@cnexlabs.com> Tested-by: Javier González <javier@cnexlabs.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e4cdf1a1cb
commit
af67c31fba
@ -1723,7 +1723,7 @@ static blk_qc_t blk_queue_bio(struct request_queue *q, struct bio *bio)
|
||||
*/
|
||||
blk_queue_bounce(q, &bio);
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
if (bio_integrity_enabled(bio) && bio_integrity_prep(bio)) {
|
||||
bio->bi_status = BLK_STS_IOERR;
|
||||
|
@ -202,8 +202,7 @@ split:
|
||||
return do_split ? new : NULL;
|
||||
}
|
||||
|
||||
void blk_queue_split(struct request_queue *q, struct bio **bio,
|
||||
struct bio_set *bs)
|
||||
void blk_queue_split(struct request_queue *q, struct bio **bio)
|
||||
{
|
||||
struct bio *split, *res;
|
||||
unsigned nsegs;
|
||||
@ -211,13 +210,13 @@ void blk_queue_split(struct request_queue *q, struct bio **bio,
|
||||
switch (bio_op(*bio)) {
|
||||
case REQ_OP_DISCARD:
|
||||
case REQ_OP_SECURE_ERASE:
|
||||
split = blk_bio_discard_split(q, *bio, bs, &nsegs);
|
||||
split = blk_bio_discard_split(q, *bio, q->bio_split, &nsegs);
|
||||
break;
|
||||
case REQ_OP_WRITE_ZEROES:
|
||||
split = blk_bio_write_zeroes_split(q, *bio, bs, &nsegs);
|
||||
split = blk_bio_write_zeroes_split(q, *bio, q->bio_split, &nsegs);
|
||||
break;
|
||||
case REQ_OP_WRITE_SAME:
|
||||
split = blk_bio_write_same_split(q, *bio, bs, &nsegs);
|
||||
split = blk_bio_write_same_split(q, *bio, q->bio_split, &nsegs);
|
||||
break;
|
||||
default:
|
||||
split = blk_bio_segment_split(q, *bio, q->bio_split, &nsegs);
|
||||
|
@ -1499,7 +1499,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
|
||||
|
||||
blk_queue_bounce(q, &bio);
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
if (bio_integrity_enabled(bio) && bio_integrity_prep(bio)) {
|
||||
bio_io_error(bio);
|
||||
|
@ -1560,7 +1560,7 @@ blk_qc_t drbd_make_request(struct request_queue *q, struct bio *bio)
|
||||
struct drbd_device *device = (struct drbd_device *) q->queuedata;
|
||||
unsigned long start_jif;
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
start_jif = jiffies;
|
||||
|
||||
|
@ -2414,7 +2414,7 @@ static blk_qc_t pkt_make_request(struct request_queue *q, struct bio *bio)
|
||||
|
||||
blk_queue_bounce(q, &bio);
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
pd = q->queuedata;
|
||||
if (!pd) {
|
||||
|
@ -606,7 +606,7 @@ static blk_qc_t ps3vram_make_request(struct request_queue *q, struct bio *bio)
|
||||
|
||||
dev_dbg(&dev->core, "%s\n", __func__);
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
spin_lock_irq(&priv->lock);
|
||||
busy = !bio_list_empty(&priv->list);
|
||||
|
@ -151,7 +151,7 @@ static blk_qc_t rsxx_make_request(struct request_queue *q, struct bio *bio)
|
||||
struct rsxx_bio_meta *bio_meta;
|
||||
blk_status_t st = BLK_STS_IOERR;
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
might_sleep();
|
||||
|
||||
|
@ -529,7 +529,7 @@ static blk_qc_t mm_make_request(struct request_queue *q, struct bio *bio)
|
||||
(unsigned long long)bio->bi_iter.bi_sector,
|
||||
bio->bi_iter.bi_size);
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
spin_lock_irq(&card->lock);
|
||||
*card->biotail = bio;
|
||||
|
@ -33,7 +33,7 @@ static int pblk_rw_io(struct request_queue *q, struct pblk *pblk,
|
||||
* constraint. Writes can be of arbitrary size.
|
||||
*/
|
||||
if (bio_data_dir(bio) == READ) {
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
ret = pblk_submit_read(pblk, bio);
|
||||
if (ret == NVM_IO_DONE && bio_flagged(bio, BIO_CLONED))
|
||||
bio_put(bio);
|
||||
@ -46,7 +46,7 @@ static int pblk_rw_io(struct request_queue *q, struct pblk *pblk,
|
||||
* available for user I/O.
|
||||
*/
|
||||
if (unlikely(pblk_get_secs(bio) >= pblk_rl_sysfs_rate_show(&pblk->rl)))
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
return pblk_write_to_cache(pblk, bio, PBLK_IOTYPE_USER);
|
||||
}
|
||||
|
@ -994,7 +994,7 @@ static blk_qc_t rrpc_make_rq(struct request_queue *q, struct bio *bio)
|
||||
struct nvm_rq *rqd;
|
||||
int err;
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
if (bio_op(bio) == REQ_OP_DISCARD) {
|
||||
rrpc_discard(rrpc, bio);
|
||||
|
@ -265,7 +265,7 @@ static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio)
|
||||
unsigned int sectors;
|
||||
int cpu;
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
if (mddev == NULL || mddev->pers == NULL) {
|
||||
bio_io_error(bio);
|
||||
|
@ -845,7 +845,7 @@ dcssblk_make_request(struct request_queue *q, struct bio *bio)
|
||||
unsigned long source_addr;
|
||||
unsigned long bytes_done;
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
bytes_done = 0;
|
||||
dev_info = bio->bi_bdev->bd_disk->private_data;
|
||||
|
@ -190,7 +190,7 @@ static blk_qc_t xpram_make_request(struct request_queue *q, struct bio *bio)
|
||||
unsigned long page_addr;
|
||||
unsigned long bytes;
|
||||
|
||||
blk_queue_split(q, &bio, q->bio_split);
|
||||
blk_queue_split(q, &bio);
|
||||
|
||||
if ((bio->bi_iter.bi_sector & 7) != 0 ||
|
||||
(bio->bi_iter.bi_size & 4095) != 0)
|
||||
|
@ -944,8 +944,7 @@ extern blk_status_t blk_insert_cloned_request(struct request_queue *q,
|
||||
struct request *rq);
|
||||
extern int blk_rq_append_bio(struct request *rq, struct bio *bio);
|
||||
extern void blk_delay_queue(struct request_queue *, unsigned long);
|
||||
extern void blk_queue_split(struct request_queue *, struct bio **,
|
||||
struct bio_set *);
|
||||
extern void blk_queue_split(struct request_queue *, struct bio **);
|
||||
extern void blk_recount_segments(struct request_queue *, struct bio *);
|
||||
extern int scsi_verify_blk_ioctl(struct block_device *, unsigned int);
|
||||
extern int scsi_cmd_blk_ioctl(struct block_device *, fmode_t,
|
||||
|
Loading…
Reference in New Issue
Block a user