* [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters
@ 2015-09-03 16:11 Vitaly Kuznetsov
2015-09-15 14:27 ` Vitaly Kuznetsov
0 siblings, 1 reply; 5+ messages in thread
From: Vitaly Kuznetsov @ 2015-09-03 16:11 UTC (permalink / raw)
To: James E.J. Bottomley
Cc: linux-scsi, linux-kernel, K. Y. Srinivasan, Long Li, Dexuan Cui
Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the
SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at
least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan:
INQUIRY result too short (5), using 36' messages on console. This can be
problematic for slow consoles. Introduce short_inquiry host template flag
to avoid printing error messages for such adapters.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
Changes since v1:
- This is a successor of previously sent "scsi_scan: move 'INQUIRY result
too short' message to debug level" patch. Instead of moving the message
to debug level for all adapters introduce a special 'short_inquiry' flag
for host template [inspired by James Bottomley].
---
drivers/scsi/scsi_scan.c | 7 ++++---
drivers/scsi/storvsc_drv.c | 1 +
include/scsi/scsi_host.h | 6 ++++++
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index f9f3f82..f1d00a0 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -701,9 +701,10 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result,
* strings.
*/
if (sdev->inquiry_len < 36) {
- sdev_printk(KERN_INFO, sdev,
- "scsi scan: INQUIRY result too short (%d),"
- " using 36\n", sdev->inquiry_len);
+ if (!sdev->host->hostt->short_inquiry)
+ sdev_printk(KERN_INFO, sdev,
+ "scsi scan: INQUIRY result too short (%d),"
+ " using 36\n", sdev->inquiry_len);
sdev->inquiry_len = 36;
}
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 3c6584f..f3b4d0f 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1711,6 +1711,7 @@ static struct scsi_host_template scsi_driver = {
/* Make sure we dont get a sg segment crosses a page boundary */
.dma_boundary = PAGE_SIZE-1,
.no_write_same = 1,
+ .short_inquiry = 1,
};
enum {
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index e113c75..7b022af 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -454,6 +454,12 @@ struct scsi_host_template {
unsigned no_async_abort:1;
/*
+ * True if this host adapter returns short (<36 bytes) responses to
+ * some INQUIRY requests.
+ */
+ unsigned short_inquiry:1;
+
+ /*
* Countdown for host blocking with no commands outstanding.
*/
unsigned int max_host_blocked;
--
2.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters
2015-09-03 16:11 [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters Vitaly Kuznetsov
@ 2015-09-15 14:27 ` Vitaly Kuznetsov
2015-09-15 18:24 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Vitaly Kuznetsov @ 2015-09-15 14:27 UTC (permalink / raw)
To: James E.J. Bottomley
Cc: linux-scsi, linux-kernel, K. Y. Srinivasan, Long Li, Dexuan Cui
Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the
> SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at
> least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan:
> INQUIRY result too short (5), using 36' messages on console. This can be
> problematic for slow consoles. Introduce short_inquiry host template flag
> to avoid printing error messages for such adapters.
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> Changes since v1:
> - This is a successor of previously sent "scsi_scan: move 'INQUIRY result
> too short' message to debug level" patch. Instead of moving the message
> to debug level for all adapters introduce a special 'short_inquiry' flag
> for host template [inspired by James Bottomley].
James,
sorry for the ping but can you please let me know your opinion? This is
not a 'cosmetic fix', serial port on Hyper-V is extremely slow and users
get softlockups just because we output too much. Here is a freshly
booted guest with SCSI and FC adapters connected:
# dmesg | grep -c INQUIRY
2076
(my other pernding '[PATCH] scsi_scan: don't dump trace when
scsi_prep_async_scan() is called twice' is related to the same issue).
See also: https://lkml.org/lkml/2015/9/6/119
Thanks,
[...]
--
Vitaly
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters
2015-09-15 14:27 ` Vitaly Kuznetsov
@ 2015-09-15 18:24 ` James Bottomley
2015-09-15 19:55 ` KY Srinivasan
0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2015-09-15 18:24 UTC (permalink / raw)
To: Vitaly Kuznetsov
Cc: linux-scsi, linux-kernel, K. Y. Srinivasan, Long Li, Dexuan Cui
On Tue, 2015-09-15 at 16:27 +0200, Vitaly Kuznetsov wrote:
> Vitaly Kuznetsov <vkuznets@redhat.com> writes:
>
> > Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the
> > SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at
> > least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan:
> > INQUIRY result too short (5), using 36' messages on console. This can be
> > problematic for slow consoles. Introduce short_inquiry host template flag
> > to avoid printing error messages for such adapters.
> >
> > Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> > ---
> > Changes since v1:
> > - This is a successor of previously sent "scsi_scan: move 'INQUIRY result
> > too short' message to debug level" patch. Instead of moving the message
> > to debug level for all adapters introduce a special 'short_inquiry' flag
> > for host template [inspired by James Bottomley].
>
> James,
>
> sorry for the ping but can you please let me know your opinion? This is
> not a 'cosmetic fix', serial port on Hyper-V is extremely slow and users
> get softlockups just because we output too much. Here is a freshly
> booted guest with SCSI and FC adapters connected:
>
> # dmesg | grep -c INQUIRY
> 2076
It needs a review ... preferably from someone who validates that we
don't get any adverse impact from the missing inquiry data
> (my other pernding '[PATCH] scsi_scan: don't dump trace when
> scsi_prep_async_scan() is called twice' is related to the same issue).
So does this.
James
> See also: https://lkml.org/lkml/2015/9/6/119
>
> Thanks,
>
> [...]
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters
2015-09-15 18:24 ` James Bottomley
@ 2015-09-15 19:55 ` KY Srinivasan
0 siblings, 0 replies; 5+ messages in thread
From: KY Srinivasan @ 2015-09-15 19:55 UTC (permalink / raw)
To: James Bottomley, Vitaly Kuznetsov
Cc: linux-scsi, linux-kernel, Long Li, Dexuan Cui
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2636 bytes --]
> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
> Sent: Tuesday, September 15, 2015 11:24 AM
> To: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; KY Srinivasan
> <kys@microsoft.com>; Long Li <longli@microsoft.com>; Dexuan Cui
> <decui@microsoft.com>
> Subject: Re: [PATCH v2] scsi: introduce short_inquiry flag for broken host
> adapters
>
> On Tue, 2015-09-15 at 16:27 +0200, Vitaly Kuznetsov wrote:
> > Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> >
> > > Some host adapters (e.g. Hyper-V storvsc) are known for not respecting
> the
> > > SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at
> > > least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan:
> > > INQUIRY result too short (5), using 36' messages on console. This can be
> > > problematic for slow consoles. Introduce short_inquiry host template flag
> > > to avoid printing error messages for such adapters.
> > >
> > > Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> > > ---
> > > Changes since v1:
> > > - This is a successor of previously sent "scsi_scan: move 'INQUIRY result
> > > too short' message to debug level" patch. Instead of moving the
> message
> > > to debug level for all adapters introduce a special 'short_inquiry' flag
> > > for host template [inspired by James Bottomley].
> >
> > James,
> >
> > sorry for the ping but can you please let me know your opinion? This is
> > not a 'cosmetic fix', serial port on Hyper-V is extremely slow and users
> > get softlockups just because we output too much. Here is a freshly
> > booted guest with SCSI and FC adapters connected:
> >
> > # dmesg | grep -c INQUIRY
> > 2076
>
> It needs a review ... preferably from someone who validates that we
> don't get any adverse impact from the missing inquiry data
>
> > (my other pernding '[PATCH] scsi_scan: don't dump trace when
> > scsi_prep_async_scan() is called twice' is related to the same issue).
>
> So does this.
James,
I will review the code and test this as well.
Regards,
K. Y
>
> James
>
>
> > See also:
> https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2flkml.or
> g%2flkml%2f2015%2f9%2f6%2f119&data=01%7c01%7ckys%40microsoft.com
> %7c7a6e9ccabb2f43c0a01108d2bdfad826%7c72f988bf86f141af91ab2d7cd011
> db47%7c1&sdata=t3IGLMiG2sU4VJfmGiYKGMy22d3IxHbGQZop63nrV7Y%3d
> >
> > Thanks,
> >
> > [...]
> >
>
>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters
@ 2015-09-15 19:55 ` KY Srinivasan
0 siblings, 0 replies; 5+ messages in thread
From: KY Srinivasan @ 2015-09-15 19:55 UTC (permalink / raw)
To: James Bottomley, Vitaly Kuznetsov
Cc: linux-scsi, linux-kernel, Long Li, Dexuan Cui
> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
> Sent: Tuesday, September 15, 2015 11:24 AM
> To: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; KY Srinivasan
> <kys@microsoft.com>; Long Li <longli@microsoft.com>; Dexuan Cui
> <decui@microsoft.com>
> Subject: Re: [PATCH v2] scsi: introduce short_inquiry flag for broken host
> adapters
>
> On Tue, 2015-09-15 at 16:27 +0200, Vitaly Kuznetsov wrote:
> > Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> >
> > > Some host adapters (e.g. Hyper-V storvsc) are known for not respecting
> the
> > > SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at
> > > least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan:
> > > INQUIRY result too short (5), using 36' messages on console. This can be
> > > problematic for slow consoles. Introduce short_inquiry host template flag
> > > to avoid printing error messages for such adapters.
> > >
> > > Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> > > ---
> > > Changes since v1:
> > > - This is a successor of previously sent "scsi_scan: move 'INQUIRY result
> > > too short' message to debug level" patch. Instead of moving the
> message
> > > to debug level for all adapters introduce a special 'short_inquiry' flag
> > > for host template [inspired by James Bottomley].
> >
> > James,
> >
> > sorry for the ping but can you please let me know your opinion? This is
> > not a 'cosmetic fix', serial port on Hyper-V is extremely slow and users
> > get softlockups just because we output too much. Here is a freshly
> > booted guest with SCSI and FC adapters connected:
> >
> > # dmesg | grep -c INQUIRY
> > 2076
>
> It needs a review ... preferably from someone who validates that we
> don't get any adverse impact from the missing inquiry data
>
> > (my other pernding '[PATCH] scsi_scan: don't dump trace when
> > scsi_prep_async_scan() is called twice' is related to the same issue).
>
> So does this.
James,
I will review the code and test this as well.
Regards,
K. Y
>
> James
>
>
> > See also:
> https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2flkml.or
> g%2flkml%2f2015%2f9%2f6%2f119&data=01%7c01%7ckys%40microsoft.com
> %7c7a6e9ccabb2f43c0a01108d2bdfad826%7c72f988bf86f141af91ab2d7cd011
> db47%7c1&sdata=t3IGLMiG2sU4VJfmGiYKGMy22d3IxHbGQZop63nrV7Y%3d
> >
> > Thanks,
> >
> > [...]
> >
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-15 19:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03 16:11 [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters Vitaly Kuznetsov
2015-09-15 14:27 ` Vitaly Kuznetsov
2015-09-15 18:24 ` James Bottomley
2015-09-15 19:55 ` KY Srinivasan
2015-09-15 19:55 ` KY Srinivasan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.