* [PATCH AUTOSEL 5.4 5/6] scsi: storvsc: Always set no_report_opcodes [not found] <20230626215116.179581-1-sashal@kernel.org> @ 2023-06-26 21:51 ` Sasha Levin 0 siblings, 0 replies; 2+ messages in thread From: Sasha Levin @ 2023-06-26 21:51 UTC (permalink / raw) To: linux-kernel, stable Cc: Michael Kelley, Martin K . Petersen, Sasha Levin, kys, haiyangz, wei.liu, decui, jejb, linux-hyperv, linux-scsi From: Michael Kelley <mikelley@microsoft.com> [ Upstream commit 31d16e712bdcaee769de4780f72ff8d6cd3f0589 ] Hyper-V synthetic SCSI devices do not support the MAINTENANCE_IN SCSI command, so scsi_report_opcode() always fails, resulting in messages like this: hv_storvsc <guid>: tag#205 cmd 0xa3 status: scsi 0x2 srb 0x86 hv 0xc0000001 The recently added support for command duration limits calls scsi_report_opcode() four times as each device comes online, which significantly increases the number of messages logged in a system with many disks. Fix the problem by always marking Hyper-V synthetic SCSI devices as not supporting scsi_report_opcode(). With this setting, the MAINTENANCE_IN SCSI command is not issued and no messages are logged. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/1686343101-18930-1-git-send-email-mikelley@microsoft.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/scsi/storvsc_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 8d1b19b2322f5..a91ee2b03c382 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1423,6 +1423,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) { blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ)); + /* storvsc devices don't support MAINTENANCE_IN SCSI cmd */ + sdevice->no_report_opcodes = 1; sdevice->no_write_same = 1; /* -- 2.39.2 ^ permalink raw reply related [flat|nested] 2+ messages in thread
[parent not found: <20230829133352.520671-1-sashal@kernel.org>]
* [PATCH AUTOSEL 5.4 5/6] scsi: storvsc: Always set no_report_opcodes [not found] <20230829133352.520671-1-sashal@kernel.org> @ 2023-08-29 13:33 ` Sasha Levin 0 siblings, 0 replies; 2+ messages in thread From: Sasha Levin @ 2023-08-29 13:33 UTC (permalink / raw) To: linux-kernel, stable Cc: Michael Kelley, Martin K . Petersen, Sasha Levin, kys, haiyangz, wei.liu, decui, jejb, linux-hyperv, linux-scsi From: Michael Kelley <mikelley@microsoft.com> [ Upstream commit 31d16e712bdcaee769de4780f72ff8d6cd3f0589 ] Hyper-V synthetic SCSI devices do not support the MAINTENANCE_IN SCSI command, so scsi_report_opcode() always fails, resulting in messages like this: hv_storvsc <guid>: tag#205 cmd 0xa3 status: scsi 0x2 srb 0x86 hv 0xc0000001 The recently added support for command duration limits calls scsi_report_opcode() four times as each device comes online, which significantly increases the number of messages logged in a system with many disks. Fix the problem by always marking Hyper-V synthetic SCSI devices as not supporting scsi_report_opcode(). With this setting, the MAINTENANCE_IN SCSI command is not issued and no messages are logged. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/1686343101-18930-1-git-send-email-mikelley@microsoft.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/scsi/storvsc_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 8d1b19b2322f5..a91ee2b03c382 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1423,6 +1423,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) { blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ)); + /* storvsc devices don't support MAINTENANCE_IN SCSI cmd */ + sdevice->no_report_opcodes = 1; sdevice->no_write_same = 1; /* -- 2.40.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-29 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230626215116.179581-1-sashal@kernel.org>
2023-06-26 21:51 ` [PATCH AUTOSEL 5.4 5/6] scsi: storvsc: Always set no_report_opcodes Sasha Levin
     [not found] <20230829133352.520671-1-sashal@kernel.org>
2023-08-29 13:33 ` Sasha Levin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).