Re: [RFC PATCH 10/14] SCSI: use the dedicated admin queue to send admin commands
From: Bart Van Assche <hidden>
Date: 2018-08-07 23:33:15
From: Bart Van Assche <hidden>
Date: 2018-08-07 23:33:15
On Wed, 2018-08-08 at 01:44 +0800, Ming Lei wrote:
--- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c@@ -278,16 +278,16 @@ int __scsi_execute(struc=
t scsi_device *sdev, const unsigned char *cmd,
struct request *req; struct scsi_request *rq; int ret = DRIVER_ERROR << 24; + struct request_queue *q = sdev->host->admin�
8-q;
=20 - req = blk_get_request(sdev->request_queue, + req = blk_get_request(q, data_direction == DMA_TO_DEVICE ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, BLK_=
-MQ_REQ_PREEMPT); The above looks weird to me. Why are all RQF_PREEMPT requests sent to t= he admin queue instead of only RQF_PM requests?
@@ -299,6 +299,8 @@ int __scsi_execute(struct =
scsi_device *sdev, const unsigned char *cmd,
req->cmd_flags |= flags; req->rq_flags |= rq_flags | RQF_QUIET;=
-
=20 + atomic_inc(&sdev->nr_admin_pending);
Why has a new counter been introduced to keep track of admin requests inste= ad of using q_usage_counter? Thanks, Bart.