Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1634334

Re: [PATCH 01/13] blk: remove bio_set arg from blk_queue_split()

From javigon <javigon.napster@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 01/13] blk: remove bio_set arg from blk_queue_split()
Date 2017-05-02 12:50 +0200
Message-ID <tCDxw-5t1-7@gated-at.bofh.it> (permalink)
References <tCwZ3-ZU-3@gated-at.bofh.it> <tCwZ3-ZU-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

> On 2 May 2017, at 05.42, NeilBrown <neilb@suse.com> 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@lst.de>
> Reviewed-by: Ming Lei <ming.lei@redhat.com>
> Credit-to: Javier González <jg@lightnvm.io> (Noticed that lightnvm was missed)
> Signed-off-by: NeilBrown <neilb@suse.com>
> ---
> 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@cnexlabs.com>
Tested-by: Javier González <javier@cnexlabs.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 01/13] blk: remove bio_set arg from blk_queue_split() NeilBrown <neilb@suse.com> - 2017-05-02 05:50 +0200
  Re: [PATCH 01/13] blk: remove bio_set arg from blk_queue_split() javigon <javigon.napster@gmail.com> - 2017-05-02 12:50 +0200

csiph-web