|
|
05bba0 |
From 684c8889083b1479d64c7a04b2d0dd8b9961d46d Mon Sep 17 00:00:00 2001
|
|
|
05bba0 |
From: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
05bba0 |
Date: Mon, 3 Aug 2015 16:51:20 +0200
|
|
|
05bba0 |
Subject: [PATCH 06/13] scsi-disk: fix cmd.mode field typo
|
|
|
05bba0 |
|
|
|
05bba0 |
Message-id: <1438620680-24121-3-git-send-email-stefanha@redhat.com>
|
|
|
05bba0 |
Patchwork-id: 67256
|
|
|
05bba0 |
O-Subject: [RHEL-7.2 qemu-kvm PATCH 2/2] scsi-disk: fix cmd.mode field typo
|
|
|
05bba0 |
Bugzilla: 1249718
|
|
|
05bba0 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
05bba0 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
05bba0 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
05bba0 |
|
|
|
05bba0 |
The cmd.xfer field is the data length. The cmd.mode field is the data
|
|
|
05bba0 |
transfer direction.
|
|
|
05bba0 |
|
|
|
05bba0 |
scsi_handle_rw_error() was using the wrong error policy for read
|
|
|
05bba0 |
requests.
|
|
|
05bba0 |
|
|
|
05bba0 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
05bba0 |
Message-Id: <1438262173-11546-3-git-send-email-stefanha@redhat.com>
|
|
|
05bba0 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
05bba0 |
(cherry picked from commit c85a7a0057ca454607a40cde991d495e0deec34d)
|
|
|
05bba0 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
05bba0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
05bba0 |
---
|
|
|
05bba0 |
hw/scsi/scsi-disk.c | 2 +-
|
|
|
05bba0 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
05bba0 |
|
|
|
05bba0 |
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
|
|
|
05bba0 |
index 50b7910..8a8b0ab 100644
|
|
|
05bba0 |
--- a/hw/scsi/scsi-disk.c
|
|
|
05bba0 |
+++ b/hw/scsi/scsi-disk.c
|
|
|
05bba0 |
@@ -413,7 +413,7 @@ static void scsi_read_data(SCSIRequest *req)
|
|
|
05bba0 |
*/
|
|
|
05bba0 |
static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
|
|
|
05bba0 |
{
|
|
|
05bba0 |
- bool is_read = (r->req.cmd.xfer == SCSI_XFER_FROM_DEV);
|
|
|
05bba0 |
+ bool is_read = (r->req.cmd.mode == SCSI_XFER_FROM_DEV);
|
|
|
05bba0 |
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
|
|
|
05bba0 |
BlockErrorAction action = bdrv_get_error_action(s->qdev.conf.bs, is_read, error);
|
|
|
05bba0 |
|
|
|
05bba0 |
--
|
|
|
05bba0 |
1.8.3.1
|
|
|
05bba0 |
|