[Qemu-devel] [RFC PATCH v1 2/5] pc-bios/s390-ccw: Remove duplicate blk_factor adjustment

Eric Farman posted 5 patches 8 years, 9 months ago
Only 4 patches received!
[Qemu-devel] [RFC PATCH v1 2/5] pc-bios/s390-ccw: Remove duplicate blk_factor adjustment
Posted by Eric Farman 8 years, 9 months ago
When using virtio-scsi, we multiply the READ(10) data_size by
a block factor twice when building the I/O.  This is fine,
since it's only 1 for SCSI disks, but let's clean it up.

Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
---
 pc-bios/s390-ccw/virtio-scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pc-bios/s390-ccw/virtio-scsi.c b/pc-bios/s390-ccw/virtio-scsi.c
index d850a8d..69b7a93 100644
--- a/pc-bios/s390-ccw/virtio-scsi.c
+++ b/pc-bios/s390-ccw/virtio-scsi.c
@@ -154,7 +154,7 @@ static bool scsi_read_10(VDev *vdev,
     VirtioCmd read_10[] = {
         { &req, sizeof(req), VRING_DESC_F_NEXT },
         { &resp, sizeof(resp), VRING_DESC_F_WRITE | VRING_DESC_F_NEXT },
-        { data, data_size * f, VRING_DESC_F_WRITE },
+        { data, data_size, VRING_DESC_F_WRITE },
     };
 
     debug_print_int("read_10  sector", sector);
-- 
2.10.2


Re: [Qemu-devel] [RFC PATCH v1 2/5] pc-bios/s390-ccw: Remove duplicate blk_factor adjustment
Posted by Christian Borntraeger 8 years, 9 months ago
On 04/26/2017 04:46 PM, Eric Farman wrote:
> When using virtio-scsi, we multiply the READ(10) data_size by
> a block factor twice when building the I/O.  This is fine,
> since it's only 1 for SCSI disks, but let's clean it up.
> 
> Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>

> ---
>  pc-bios/s390-ccw/virtio-scsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pc-bios/s390-ccw/virtio-scsi.c b/pc-bios/s390-ccw/virtio-scsi.c
> index d850a8d..69b7a93 100644
> --- a/pc-bios/s390-ccw/virtio-scsi.c
> +++ b/pc-bios/s390-ccw/virtio-scsi.c
> @@ -154,7 +154,7 @@ static bool scsi_read_10(VDev *vdev,
>      VirtioCmd read_10[] = {
>          { &req, sizeof(req), VRING_DESC_F_NEXT },
>          { &resp, sizeof(resp), VRING_DESC_F_WRITE | VRING_DESC_F_NEXT },
> -        { data, data_size * f, VRING_DESC_F_WRITE },
> +        { data, data_size, VRING_DESC_F_WRITE },
>      };
> 
>      debug_print_int("read_10  sector", sector);
>