> On 2 May 2017, at 05.42, NeilBrown <neilb@xxxxxxxx> wrote: > > 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@xxxxxx> > Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx> > Credit-to: Javier González <jg@xxxxxxxxxxx> (Noticed that lightnvm was missed) > Signed-off-by: NeilBrown <neilb@xxxxxxxx> > --- > block/blk-core.c | 2 +- > block/blk-merge.c | 9 ++++----- > block/blk-mq.c | 2 +- > drivers/block/drbd/drbd_req.c | 2 +- > drivers/block/pktcdvd.c | 2 +- > drivers/block/ps3vram.c | 2 +- > drivers/block/rsxx/dev.c | 2 +- > drivers/block/umem.c | 2 +- > drivers/block/zram/zram_drv.c | 2 +- > drivers/lightnvm/pblk-init.c | 4 ++-- > drivers/lightnvm/rrpc.c | 2 +- > drivers/md/md.c | 2 +- > drivers/s390/block/dcssblk.c | 2 +- > drivers/s390/block/xpram.c | 2 +- > include/linux/blkdev.h | 3 +-- > 15 files changed, 19 insertions(+), 21 deletions(-) > > [..] > diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c > index ae8cd6d5af8b..b3fec8ec55b8 100644 > --- a/drivers/lightnvm/pblk-init.c > +++ b/drivers/lightnvm/pblk-init.c > @@ -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); > } > diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c > index cf0e28a0ff61..8e241056b141 100644 > --- a/drivers/lightnvm/rrpc.c > +++ b/drivers/lightnvm/rrpc.c > @@ -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); > Hi Neil, Thanks for adding the LightNVM changes. It works fine on our test setup. Reviewed-by: Javier González <javier@xxxxxxxxxxxx> Tested-by: Javier González <javier@xxxxxxxxxxxx>
Attachment:
signature.asc
Description: Message signed with OpenPGP