[PATCH] scsi: storvsc: fix SRB_STATUS_ABORTED handling

2016-03-07 Thread Vitaly Kuznetsov
l required, fix the check. Fixes: 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status flags") Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/scsi/storvsc_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/st

Re: [PATCH] storvsc: add more logging for error and warning messages

2015-12-04 Thread Vitaly Kuznetsov
Long Li writes: > Introduce a logging level for storvsc to log certain error/warning > messages. Those messages are helpful in some environments, > e.g. Microsoft Azure, for customer support and troubleshooting > purposes. I have an alternative suggestion: let's use

[PATCH v3 RESEND_2] scsi: report 'INQUIRY result too short' once per host

2015-11-19 Thread Vitaly Kuznetsov
be problematic for slow consoles. Introduce short_inquiry flag in struct Scsi_Host to print the message once per host. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v3 RESEND: - No changes, this is just a RESEND. Changes since v3: - No changes, this is just a RESEND. Changes

[PATCH RESEND_2] scsi_sysfs: protect against double execution of __scsi_remove_device()

2015-11-19 Thread Vitaly Kuznetsov
try doing scsi_remove_device(). shost->scan_mutex only serializes their calls to __scsi_remove_device() and we end up doing the cleanup path twice. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/scsi/scsi_sysfs.c | 8 1 file changed, 8 insertions(+) diff --

[PATCH RESEND] scsi_sysfs: protect against double execution of __scsi_remove_device()

2015-11-06 Thread Vitaly Kuznetsov
try doing scsi_remove_device(). shost->scan_mutex only serializes their calls to __scsi_remove_device() and we end up doing the cleanup path twice. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/scsi/scsi_sysfs.c | 8 1 file changed, 8 insertions(+) diff --

[PATCH RESEND] scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice

2015-10-30 Thread Vitaly Kuznetsov
running we get the message and stack dump on console. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> Reviewed-by: K. Y. Srinivasan <k...@microsoft.com> Tested-by: Alex Ng <ale...@microsoft.com> Signed-off-by: K. Y. Srinivasan <k...@microsoft.com> --- Changes since v1: -

[PATCH v3 RESEND] scsi: report 'INQUIRY result too short' once per host

2015-10-30 Thread Vitaly Kuznetsov
be problematic for slow consoles. Introduce short_inquiry flag in struct Scsi_Host to print the message once per host. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v3 RESEND: - Sorry, I screwed up James address when sending 'v3 RESEND'. Changes since v3: - no changes, this i

[PATCH v3 RESEND] scsi: report 'INQUIRY result too short' once per host

2015-10-30 Thread Vitaly Kuznetsov
be problematic for slow consoles. Introduce short_inquiry flag in struct Scsi_Host to print the message once per host. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v3: - no changes, this is just a RESEND. Changes since v2: - This is a successor of previously sent (and

Re: [PATCH] scsi_sysfs: protect against double execution of __scsi_remove_device()

2015-10-23 Thread Vitaly Kuznetsov
Bart Van Assche <bart.vanass...@sandisk.com> writes: > On 10/22/2015 10:12 AM, Vitaly Kuznetsov wrote: >> On some host errors storvsc module tries to remove sdev by scheduling a job >> which does the following: >> >> sdev = scsi_device_lookup(wrk->ho

[PATCH] scsi_sysfs: protect against double execution of __scsi_remove_device()

2015-10-22 Thread Vitaly Kuznetsov
try doing scsi_remove_device(). shost->scan_mutex only serializes their calls to __scsi_remove_device() and we end up doing the cleanup path twice. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/scsi/scsi_sysfs.c | 8 1 file changed, 8 insertions(+) diff --

Re: [PATCH v3] scsi: report 'INQUIRY result too short' once per host

2015-10-13 Thread Vitaly Kuznetsov
Hannes Reinecke <h...@suse.de> writes: > On 10/12/2015 05:16 PM, Vitaly Kuznetsov wrote: >> Hannes Reinecke <h...@suse.de> writes: >> >>> On 10/08/2015 06:54 PM, Vitaly Kuznetsov wrote: >>>> Some host adapters (e.g. Hyper-V storvsc) are known f

Re: [PATCH v3] scsi: report 'INQUIRY result too short' once per host

2015-10-12 Thread Vitaly Kuznetsov
Hannes Reinecke <h...@suse.de> writes: > On 10/08/2015 06:54 PM, Vitaly Kuznetsov wrote: >> 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 re

[PATCH v3] scsi: report 'INQUIRY result too short' once per host

2015-10-08 Thread Vitaly Kuznetsov
be problematic for slow consoles. Introduce short_inquiry flag in struct Scsi_Host to print the message once per host. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v2: - This is a successor of previously sent (and still not merged) "scsi: introduce short_inquiry flag

Re: [PATCH 0/3] scsi: Some miscellaneous fixes

2015-09-29 Thread Vitaly Kuznetsov
"K. Y. Srinivasan" <k...@microsoft.com> writes: [...] > > Vitaly Kuznetsov (2): > scsi_scan: don't dump trace when scsi_prep_async_scan() is called > twice > scsi: introduce short_inquiry flag for broken host adapters James, I'm sorry for the a

Re: [PATCH] storvsc: get rid of homegrown copy_{to,from}_bounce_buffer()

2015-09-23 Thread Vitaly Kuznetsov
Christoph Hellwig <h...@infradead.org> writes: > On Tue, Sep 22, 2015 at 06:27:50PM +0200, Vitaly Kuznetsov wrote: >> Storvsc driver needs to ensure there are no 'holes' in the presented >> sg list (all segments in the middle of the list need to be of PAGE_SIZE). > > I

[PATCH v2] storvsc: get rid of bounce buffer

2015-09-23 Thread Vitaly Kuznetsov
virt_boundary_mask to PAGE_SIZE - 1 guarantees we'll never see such holes so we can significantly simplify the driver. This is also supposed to bring us some performance improvement for certain workloads as we eliminate copying. Reported-by: Radim Krčmář <rkrc...@redhat.com> Signed-off-by:

[PATCH] storvsc: get rid of homegrown copy_{to,from}_bounce_buffer()

2015-09-22 Thread Vitaly Kuznetsov
. Scsi layer already has scsi_sg_copy_{to,from}_buffer() functions to linearize a list, the only difference is that already existent functions create a flat buffer instead of a new list but we can cope. Reported-by: Radim Krčmář <rkrc...@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuzn...@r

Re: [PATCH v2] scsi: introduce short_inquiry flag for broken host adapters

2015-09-15 Thread Vitaly Kuznetsov
Vitaly Kuznetsov <vkuzn...@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: > INQUIR

[PATCH v2] scsi: introduce short_inquiry flag for broken host adapters

2015-09-03 Thread Vitaly Kuznetsov
be problematic for slow consoles. Introduce short_inquiry host template flag to avoid printing error messages for such adapters. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- Changes since v1: - This is a successor of previously sent "scsi_scan: move 'INQUIRY result too short' messa

Re: [PATCH] scsi_scan: move 'INQUIRY result too short' message to debug level

2015-09-01 Thread Vitaly Kuznetsov
James Bottomley <james.bottom...@hansenpartnership.com> writes: > On Mon, 2015-08-31 at 14:50 +0200, Vitaly Kuznetsov wrote: >> Some Hyper-V hosts are known for ignoring SPC-2/3/4 requirement >> for 'INQUIRY data (see table ...) shall contain at least 36 bytes'. As a

[PATCH] scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice

2015-08-31 Thread Vitaly Kuznetsov
running we get the message and stack dump on console. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/scsi/scsi_scan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index f9f3f82..01ad016 100644 --- a/d

[PATCH] scsi_scan: move 'INQUIRY result too short' message to debug level

2015-08-31 Thread Vitaly Kuznetsov
extremely slow multi-VCPU guests we get CPU blocked putting these (useless) messages on console (e.g. happens when we add multiple disks). Move them to debug level. Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com> --- drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH] scsi: storvsc: be more picky about scmnd-sc_data_direction

2015-08-13 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] Sent: Thursday, June 25, 2015 9:12 AM To: linux-scsi@vger.kernel.org Cc: Long Li; KY Srinivasan; Haiyang Zhang; James E.J. Bottomley; de...@linuxdriverproject.org; linux

Re: [PATCH] scsi: storvsc: use shost_for_each_device() instead of open coding

2015-08-13 Thread Vitaly Kuznetsov
Long Li lon...@microsoft.com writes: -Original Message- From: KY Srinivasan Sent: Friday, July 03, 2015 11:35 AM To: Vitaly Kuznetsov; linux-scsi@vger.kernel.org Cc: Long Li; Haiyang Zhang; James E.J. Bottomley; de...@linuxdriverproject.org; linux-ker...@vger.kernel.org Subject

Re: [PATCH] scsi: storvsc: make INQUIRY response SPC-compliant

2015-07-07 Thread Vitaly Kuznetsov
KY Srinivasan k...@microsoft.com writes: -Original Message- From: Christoph Hellwig [mailto:h...@infradead.org] Sent: Friday, July 3, 2015 9:19 AM To: Vitaly Kuznetsov Cc: linux-scsi@vger.kernel.org; Long Li; KY Srinivasan; Haiyang Zhang; James E.J. Bottomley; de

[PATCH] scsi: storvsc: be more picky about scmnd-sc_data_direction

2015-06-25 Thread Vitaly Kuznetsov
an overkill. Reported-by: Radim Krčmář rkrc...@redhat.com Signed-off-by: Vitaly Kuznetsov vkuzn...@redhat.com --- drivers/scsi/storvsc_drv.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 3c6584f..61f4855