diff mbox

blk-mq: Remove blk_mq_queue_data.list

Message ID CY1PR0401MB15363601FA034CE8627DA41881080@CY1PR0401MB1536.namprd04.prod.outlook.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bart Van Assche April 3, 2017, 8:54 p.m. UTC
The block layer core sets blk_mq_queue_data.list but no block
drivers read that member. Hence remove it and also the code that
is used to set this member.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
 block/blk-mq.c         | 17 -----------------
 include/linux/blk-mq.h |  1 -
 2 files changed, 18 deletions(-)

Comments

Christoph Hellwig April 4, 2017, 6:59 a.m. UTC | #1
Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
Sagi Grimberg April 5, 2017, 12:02 p.m. UTC | #2
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Jens Axboe April 5, 2017, 2:07 p.m. UTC | #3
On Mon, Apr 03 2017, Bart Van Assche wrote:
> The block layer core sets blk_mq_queue_data.list but no block
> drivers read that member. Hence remove it and also the code that
> is used to set this member.

Looks fine to me, might as well kill it. Your patch came through mangled
here though, on both my private and corporate email account. Did
something change with the setup at your end? Would be great if you could
resend it.
Bart Van Assche April 5, 2017, 3:27 p.m. UTC | #4
On Wed, 2017-04-05 at 08:07 -0600, Jens Axboe wrote:
> On Mon, Apr 03 2017, Bart Van Assche wrote:
> > The block layer core sets blk_mq_queue_data.list but no block
> > drivers read that member. Hence remove it and also the code that
> > is used to set this member.
> 
> Looks fine to me, might as well kill it. Your patch came through mangled
> here though, on both my private and corporate email account. Did
> something change with the setup at your end? Would be great if you could
> resend it.

Hello Jens,

Sorry that the patch came through mangled. I send patch series with git
format-patch + git send-email. This patch was sent using git format-patch +
xclip + Thunderbird with the Toggle Word Wrap add-on configured not to wrap
long lines. This morning I tried to run git am on the copy of this patch
that I downloaded from my personal e-mail account and that worked fine.
Anyway, I will resend this patch with git send-email.

Bart.
diff mbox

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8fb983e6e2e4..b5580b09b4a5 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -984,17 +984,9 @@  bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list)
 {
 	struct request_queue *q = hctx->queue;
 	struct request *rq;
-	LIST_HEAD(driver_list);
-	struct list_head *dptr;
 	int errors, queued, ret = BLK_MQ_RQ_QUEUE_OK;
 
 	/*
-	 * Start off with dptr being NULL, so we start the first request
-	 * immediately, even if we have more pending.
-	 */
-	dptr = NULL;
-
-	/*
 	 * Now process all the entries, sending them to the driver.
 	 */
 	errors = queued = 0;
@@ -1026,7 +1018,6 @@  bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list)
 		list_del_init(&rq->queuelist);
 
 		bd.rq = rq;
-		bd.list = dptr;
 
 		/*
 		 * Flag last if we have no more requests, or if we have more
@@ -1062,13 +1053,6 @@  bool blk_mq_dispatch_rq_list(struct blk_mq_hw_ctx *hctx, struct list_head *list)
 
 		if (ret == BLK_MQ_RQ_QUEUE_BUSY)
 			break;
-
-		/*
-		 * We've done the first request. If we have more than 1
-		 * left in the list, set dptr to defer issue.
-		 */
-		if (!dptr && list->next != list->prev)
-			dptr = &driver_list;
 	}
 
 	hctx->dispatched[queued_to_index(queued)]++;
@@ -1451,7 +1435,6 @@  static void __blk_mq_try_issue_directly(struct request *rq, blk_qc_t *cookie,
 	struct request_queue *q = rq->q;
 	struct blk_mq_queue_data bd = {
 		.rq = rq,
-		.list = NULL,
 		.last = 1
 	};
 	struct blk_mq_hw_ctx *hctx;
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index ebeea36ff9cd..90af6a31458d 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -81,7 +81,6 @@  struct blk_mq_tag_set {
 
 struct blk_mq_queue_data {
 	struct request *rq;
-	struct list_head *list;
 	bool last;
 };