|
|
9ae3a8 |
From 8ba513a1fa324d87a412705d2ded64e2154e1f2a Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 4 Apr 2014 05:56:00 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 05/12] iscsi: recognize "invalid field" ASCQ from WRITE SAME command
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1396590962-25815-6-git-send-email-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 58342
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 0day qemu-kvm PATCH 5/7] iscsi: recognize "invalid field" ASCQ from WRITE SAME command
|
|
|
9ae3a8 |
Bugzilla: 1083413
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Some targets may return "invalid field" as the ASCQ from WRITE SAME
|
|
|
9ae3a8 |
if they support the command only without the UNMAP field. Recognize
|
|
|
9ae3a8 |
that, and return ENOTSUP just like for "invalid operation code".
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Reviewed-by: Peter Lieven <pl@kamp.de>
|
|
|
9ae3a8 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 27898a5daa4c6d28adb32b401a011d7198494482)
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/iscsi.c | 3 ++-
|
|
|
9ae3a8 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/iscsi.c | 3 ++-
|
|
|
9ae3a8 |
1 files changed, 2 insertions(+), 1 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/iscsi.c b/block/iscsi.c
|
|
|
9ae3a8 |
index 4a535e3..268da2f 100644
|
|
|
9ae3a8 |
--- a/block/iscsi.c
|
|
|
9ae3a8 |
+++ b/block/iscsi.c
|
|
|
9ae3a8 |
@@ -1012,7 +1012,8 @@ retry:
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if (iTask.status == SCSI_STATUS_CHECK_CONDITION &&
|
|
|
9ae3a8 |
iTask.task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST &&
|
|
|
9ae3a8 |
- iTask.task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
|
|
|
9ae3a8 |
+ (iTask.task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE ||
|
|
|
9ae3a8 |
+ iTask.task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_FIELD_IN_CDB)) {
|
|
|
9ae3a8 |
/* WRITE SAME is not supported by the target */
|
|
|
9ae3a8 |
iscsilun->has_write_same = false;
|
|
|
9ae3a8 |
scsi_free_scsi_task(iTask.task);
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|