* [PATCH] virtio-scsi: Change sense buffer size to 252
@ 2014-03-06 8:47 Fam Zheng
2014-03-06 10:09 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Fam Zheng @ 2014-03-06 8:47 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-scsi, kvm, pbonzini
According to SPC-4, section 4.5.2.1, 252 is the limit of sense data. So
increase the value.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
include/linux/virtio_scsi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
index 4195b97..a437f7f 100644
--- a/include/linux/virtio_scsi.h
+++ b/include/linux/virtio_scsi.h
@@ -28,7 +28,7 @@
#define _LINUX_VIRTIO_SCSI_H
#define VIRTIO_SCSI_CDB_SIZE 32
-#define VIRTIO_SCSI_SENSE_SIZE 96
+#define VIRTIO_SCSI_SENSE_SIZE 252
/* SCSI command request, followed by data-out */
struct virtio_scsi_cmd_req {
--
1.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] virtio-scsi: Change sense buffer size to 252
2014-03-06 8:47 [PATCH] virtio-scsi: Change sense buffer size to 252 Fam Zheng
@ 2014-03-06 10:09 ` Paolo Bonzini
2014-03-06 11:22 ` Hannes Reinecke
2014-03-07 5:56 ` Fam Zheng
0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-03-06 10:09 UTC (permalink / raw)
To: Fam Zheng, linux-kernel; +Cc: linux-scsi, kvm
Il 06/03/2014 09:47, Fam Zheng ha scritto:
> According to SPC-4, section 4.5.2.1, 252 is the limit of sense data. So
> increase the value.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> include/linux/virtio_scsi.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
> index 4195b97..a437f7f 100644
> --- a/include/linux/virtio_scsi.h
> +++ b/include/linux/virtio_scsi.h
> @@ -28,7 +28,7 @@
> #define _LINUX_VIRTIO_SCSI_H
>
> #define VIRTIO_SCSI_CDB_SIZE 32
> -#define VIRTIO_SCSI_SENSE_SIZE 96
> +#define VIRTIO_SCSI_SENSE_SIZE 252
>
> /* SCSI command request, followed by data-out */
> struct virtio_scsi_cmd_req {
>
Hi Fam, how did you test this?
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] virtio-scsi: Change sense buffer size to 252
2014-03-06 10:09 ` Paolo Bonzini
@ 2014-03-06 11:22 ` Hannes Reinecke
2014-03-06 11:55 ` Paolo Bonzini
2014-03-07 5:56 ` Fam Zheng
1 sibling, 1 reply; 6+ messages in thread
From: Hannes Reinecke @ 2014-03-06 11:22 UTC (permalink / raw)
To: Paolo Bonzini, Fam Zheng, linux-kernel; +Cc: linux-scsi, kvm
On 03/06/2014 11:09 AM, Paolo Bonzini wrote:
> Il 06/03/2014 09:47, Fam Zheng ha scritto:
>> According to SPC-4, section 4.5.2.1, 252 is the limit of sense
>> data. So
>> increase the value.
>>
>> Signed-off-by: Fam Zheng <famz@redhat.com>
>> ---
>> include/linux/virtio_scsi.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/virtio_scsi.h
>> b/include/linux/virtio_scsi.h
>> index 4195b97..a437f7f 100644
>> --- a/include/linux/virtio_scsi.h
>> +++ b/include/linux/virtio_scsi.h
>> @@ -28,7 +28,7 @@
>> #define _LINUX_VIRTIO_SCSI_H
>>
>> #define VIRTIO_SCSI_CDB_SIZE 32
>> -#define VIRTIO_SCSI_SENSE_SIZE 96
>> +#define VIRTIO_SCSI_SENSE_SIZE 252
>>
>> /* SCSI command request, followed by data-out */
>> struct virtio_scsi_cmd_req {
>>
>
> Hi Fam, how did you test this?
>
Is there a specific reason _not_ to use the linux default?
The SCSI stack typically limits the sense code to
SCSI_SENSE_BUFFERSIZE, so using other values have a
limited sense.
Literally :-)
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] virtio-scsi: Change sense buffer size to 252
2014-03-06 11:22 ` Hannes Reinecke
@ 2014-03-06 11:55 ` Paolo Bonzini
2014-03-07 5:59 ` Fam Zheng
0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2014-03-06 11:55 UTC (permalink / raw)
To: Hannes Reinecke, Fam Zheng, linux-kernel; +Cc: linux-scsi, kvm
Il 06/03/2014 12:22, Hannes Reinecke ha scritto:
> On 03/06/2014 11:09 AM, Paolo Bonzini wrote:
>> Il 06/03/2014 09:47, Fam Zheng ha scritto:
>>> According to SPC-4, section 4.5.2.1, 252 is the limit of sense
>>> data. So
>>> increase the value.
>>>
>>> Signed-off-by: Fam Zheng <famz@redhat.com>
>>> ---
>>> include/linux/virtio_scsi.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/linux/virtio_scsi.h
>>> b/include/linux/virtio_scsi.h
>>> index 4195b97..a437f7f 100644
>>> --- a/include/linux/virtio_scsi.h
>>> +++ b/include/linux/virtio_scsi.h
>>> @@ -28,7 +28,7 @@
>>> #define _LINUX_VIRTIO_SCSI_H
>>>
>>> #define VIRTIO_SCSI_CDB_SIZE 32
>>> -#define VIRTIO_SCSI_SENSE_SIZE 96
>>> +#define VIRTIO_SCSI_SENSE_SIZE 252
>>>
>>> /* SCSI command request, followed by data-out */
>>> struct virtio_scsi_cmd_req {
>>>
>>
>> Hi Fam, how did you test this?
>
> Is there a specific reason _not_ to use the linux default?
> The SCSI stack typically limits the sense code to
> SCSI_SENSE_BUFFERSIZE, so using other values have a
> limited sense.
> Literally :-)
Indeed I don't think this patch makes a difference. Though I asked not
from the SCSI stack perspective, but because right now both virtio-scsi
targets (QEMU and vhost-scsi) are also truncating at 96.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] virtio-scsi: Change sense buffer size to 252
2014-03-06 10:09 ` Paolo Bonzini
2014-03-06 11:22 ` Hannes Reinecke
@ 2014-03-07 5:56 ` Fam Zheng
1 sibling, 0 replies; 6+ messages in thread
From: Fam Zheng @ 2014-03-07 5:56 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: linux-kernel, linux-scsi, kvm
On Thu, 03/06 11:09, Paolo Bonzini wrote:
> Il 06/03/2014 09:47, Fam Zheng ha scritto:
> >According to SPC-4, section 4.5.2.1, 252 is the limit of sense data. So
> >increase the value.
> >
> >Signed-off-by: Fam Zheng <famz@redhat.com>
> >---
> > include/linux/virtio_scsi.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h
> >index 4195b97..a437f7f 100644
> >--- a/include/linux/virtio_scsi.h
> >+++ b/include/linux/virtio_scsi.h
> >@@ -28,7 +28,7 @@
> > #define _LINUX_VIRTIO_SCSI_H
> >
> > #define VIRTIO_SCSI_CDB_SIZE 32
> >-#define VIRTIO_SCSI_SENSE_SIZE 96
> >+#define VIRTIO_SCSI_SENSE_SIZE 252
> >
> > /* SCSI command request, followed by data-out */
> > struct virtio_scsi_cmd_req {
> >
>
> Hi Fam, how did you test this?
>
I only tested the basic functionality of virtio-scsi. I'm doing more testing on
this and your fix on QEMU side now.
Thanks,
Fam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] virtio-scsi: Change sense buffer size to 252
2014-03-06 11:55 ` Paolo Bonzini
@ 2014-03-07 5:59 ` Fam Zheng
0 siblings, 0 replies; 6+ messages in thread
From: Fam Zheng @ 2014-03-07 5:59 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Hannes Reinecke, linux-kernel, linux-scsi, kvm
On Thu, 03/06 12:55, Paolo Bonzini wrote:
> Il 06/03/2014 12:22, Hannes Reinecke ha scritto:
> >On 03/06/2014 11:09 AM, Paolo Bonzini wrote:
> >>Il 06/03/2014 09:47, Fam Zheng ha scritto:
> >>>According to SPC-4, section 4.5.2.1, 252 is the limit of sense
> >>>data. So
> >>>increase the value.
> >>>
> >>>Signed-off-by: Fam Zheng <famz@redhat.com>
> >>>---
> >>> include/linux/virtio_scsi.h | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>>diff --git a/include/linux/virtio_scsi.h
> >>>b/include/linux/virtio_scsi.h
> >>>index 4195b97..a437f7f 100644
> >>>--- a/include/linux/virtio_scsi.h
> >>>+++ b/include/linux/virtio_scsi.h
> >>>@@ -28,7 +28,7 @@
> >>> #define _LINUX_VIRTIO_SCSI_H
> >>>
> >>> #define VIRTIO_SCSI_CDB_SIZE 32
> >>>-#define VIRTIO_SCSI_SENSE_SIZE 96
> >>>+#define VIRTIO_SCSI_SENSE_SIZE 252
> >>>
> >>> /* SCSI command request, followed by data-out */
> >>> struct virtio_scsi_cmd_req {
> >>>
> >>
> >>Hi Fam, how did you test this?
> >
> >Is there a specific reason _not_ to use the linux default?
> >The SCSI stack typically limits the sense code to
> >SCSI_SENSE_BUFFERSIZE, so using other values have a
> >limited sense.
> >Literally :-)
OK. So, do we need to lift the limit on other parts of SCSI stack as well?
>
> Indeed I don't think this patch makes a difference. Though I asked not from
> the SCSI stack perspective, but because right now both virtio-scsi targets
> (QEMU and vhost-scsi) are also truncating at 96.
>
Oh, I missed that, I'll do a more thorough review and testing. Thank you for
pointing out.
Thanks,
Fam
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-03-07 5:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 8:47 [PATCH] virtio-scsi: Change sense buffer size to 252 Fam Zheng
2014-03-06 10:09 ` Paolo Bonzini
2014-03-06 11:22 ` Hannes Reinecke
2014-03-06 11:55 ` Paolo Bonzini
2014-03-07 5:59 ` Fam Zheng
2014-03-07 5:56 ` Fam Zheng
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).