Re: [PATCH v2 10/11] megaraid_sas: Use Block layer API to check SCSI device in-flight IO requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/01/2020 11:19, Anand Lodnoor wrote:
Hannes,
                Thank you for pointing it out. Will incorporate the suggested
changes in the upcoming patches.

It doesn't look like this suggested change was incorporated in the end.

So I am rebasing series https://lore.kernel.org/linux-block/20191202153914.84722-1-hare@xxxxxxx/, and this patch conflicts. But I did think that this was a strange change, apart from that.

Thanks & Regards,
Anand R.L

-----Original Message-----
From: Hannes Reinecke [mailto:hare@xxxxxxx]
Sent: Thursday, January 16, 2020 6:01 PM
To: Anand Lodnoor<anand.lodnoor@xxxxxxxxxxxx>;linux-scsi@xxxxxxxxxxxxxxx
Cc:kashyap.desai@xxxxxxxxxxxx;sumit.saxena@xxxxxxxxxxxx;
kiran-kumar.kasturi@xxxxxxxxxxxx;sankar.patra@xxxxxxxxxxxx;
sasikumar.pc@xxxxxxxxxxxx;shivasharan.srikanteshwara@xxxxxxxxxxxx;
chandrakanth.patil@xxxxxxxxxxxx
Subject: Re: [PATCH v2 10/11] megaraid_sas: Use Block layer API to check
SCSI device in-flight IO requests

On 1/14/20 12:21 PM, Anand Lodnoor wrote:
Remove usage of device_busy counter from driver. Instead of
device_busy counter now driver uses 'nr_active' counter of
request_queue to get the number of inflight request for a LUN.

Is blk_mq_hw_ctx.nr_active really the same as scsi_device.device_busy?

Thanks,
John


Link :https://patchwork.kernel.org/patch/11249297/
Signed-off-by: Chandrakanth Patil<chandrakanth.patil@xxxxxxxxxxxx>
Signed-off-by: Anand Lodnoor<anand.lodnoor@xxxxxxxxxxxx>
---
  drivers/scsi/megaraid/megaraid_sas_fusion.c | 56
++++++++++++++++-------------
  1 file changed, 31 insertions(+), 25 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 0bdd477..f3b36fd 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -364,6 +364,35 @@ inline void megasas_return_cmd_fusion(struct
megasas_instance *instance,
  		instance->max_fw_cmds = instance->max_fw_cmds-1;
  	}
  }
+
+static inline void
+megasas_get_msix_index(struct megasas_instance *instance,
+		       struct scsi_cmnd *scmd,
+		       struct megasas_cmd_fusion *cmd,
+		       u8 data_arms)
+{
+	int sdev_busy;
+
+	/* nr_hw_queue = 1 for MegaRAID */
+	struct blk_mq_hw_ctx *hctx =
+		scmd->device->request_queue->queue_hw_ctx[0];
+
While this might be true it would be better to use the hctx from the request
itself:

struct blk_mq_hw_ctx *hctx = scmd->request->mq_hctx;

Cheers,

Hannes
-- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux