Thread (45 messages) 45 messages, 7 authors, 2017-06-18

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

From: javigon <hidden>
Date: 2017-05-02 10:45:03
Also in: lkml

On 2 May 2017, at 05.42, NeilBrown [off-list ref] 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 <redacted>
Credit-to: Javier González [off-list ref] (Noticed that lightnvm was missed)
Signed-off-by: NeilBrown <redacted>
---
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(-)
[..]
quoted hunk ↗ jump to hunk
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 <redacted>
Tested-by: Javier González <redacted>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help