|
|
958e1b |
From 2f080efe2f5055117b1083c01618305dd08e4aa9 Mon Sep 17 00:00:00 2001
|
|
|
240766 |
From: Fam Zheng <famz@redhat.com>
|
|
|
240766 |
Date: Fri, 4 Apr 2014 05:55:56 +0200
|
|
|
240766 |
Subject: [PATCH 01/12] iscsi: fix indentation
|
|
|
240766 |
|
|
|
240766 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
240766 |
Message-id: <1396590962-25815-2-git-send-email-famz@redhat.com>
|
|
|
240766 |
Patchwork-id: 58338
|
|
|
240766 |
O-Subject: [RHEL-7 0day qemu-kvm PATCH 1/7] iscsi: fix indentation
|
|
|
958e1b |
Bugzilla: 1083413
|
|
|
240766 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
240766 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
240766 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
240766 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
240766 |
|
|
|
240766 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
240766 |
|
|
|
240766 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
240766 |
Reviewed-by: Fam Zheng <famz@redhat.com>
|
|
|
240766 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
240766 |
(cherry picked from commit 35cb1748d54c8e56881a5e10138b3eb090f3a6bc)
|
|
|
240766 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
240766 |
---
|
|
|
240766 |
block/iscsi.c | 45 +++++++++++++++++++++++----------------------
|
|
|
240766 |
1 file changed, 23 insertions(+), 22 deletions(-)
|
|
|
240766 |
|
|
|
240766 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
240766 |
---
|
|
|
240766 |
block/iscsi.c | 45 +++++++++++++++++++++++----------------------
|
|
|
240766 |
1 files changed, 23 insertions(+), 22 deletions(-)
|
|
|
240766 |
|
|
|
240766 |
diff --git a/block/iscsi.c b/block/iscsi.c
|
|
|
240766 |
index 64a8295..082956c 100644
|
|
|
240766 |
--- a/block/iscsi.c
|
|
|
240766 |
+++ b/block/iscsi.c
|
|
|
240766 |
@@ -1245,35 +1245,36 @@ static QemuOptsList runtime_opts = {
|
|
|
240766 |
},
|
|
|
240766 |
};
|
|
|
240766 |
|
|
|
240766 |
-static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi,
|
|
|
240766 |
- int lun, int evpd, int pc) {
|
|
|
240766 |
- int full_size;
|
|
|
240766 |
- struct scsi_task *task = NULL;
|
|
|
240766 |
- task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64);
|
|
|
240766 |
+static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
|
|
|
240766 |
+ int evpd, int pc)
|
|
|
240766 |
+{
|
|
|
240766 |
+ int full_size;
|
|
|
240766 |
+ struct scsi_task *task = NULL;
|
|
|
240766 |
+ task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64);
|
|
|
240766 |
+ if (task == NULL || task->status != SCSI_STATUS_GOOD) {
|
|
|
240766 |
+ goto fail;
|
|
|
240766 |
+ }
|
|
|
240766 |
+ full_size = scsi_datain_getfullsize(task);
|
|
|
240766 |
+ if (full_size > task->datain.size) {
|
|
|
240766 |
+ scsi_free_scsi_task(task);
|
|
|
240766 |
+
|
|
|
240766 |
+ /* we need more data for the full list */
|
|
|
240766 |
+ task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, full_size);
|
|
|
240766 |
if (task == NULL || task->status != SCSI_STATUS_GOOD) {
|
|
|
240766 |
goto fail;
|
|
|
240766 |
}
|
|
|
240766 |
- full_size = scsi_datain_getfullsize(task);
|
|
|
240766 |
- if (full_size > task->datain.size) {
|
|
|
240766 |
- scsi_free_scsi_task(task);
|
|
|
240766 |
-
|
|
|
240766 |
- /* we need more data for the full list */
|
|
|
240766 |
- task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, full_size);
|
|
|
240766 |
- if (task == NULL || task->status != SCSI_STATUS_GOOD) {
|
|
|
240766 |
- goto fail;
|
|
|
240766 |
- }
|
|
|
240766 |
- }
|
|
|
240766 |
+ }
|
|
|
240766 |
|
|
|
240766 |
- return task;
|
|
|
240766 |
+ return task;
|
|
|
240766 |
|
|
|
240766 |
fail:
|
|
|
240766 |
- error_report("iSCSI: Inquiry command failed : %s",
|
|
|
240766 |
- iscsi_get_error(iscsi));
|
|
|
240766 |
- if (task) {
|
|
|
240766 |
- scsi_free_scsi_task(task);
|
|
|
240766 |
- return NULL;
|
|
|
240766 |
- }
|
|
|
240766 |
+ error_report("iSCSI: Inquiry command failed : %s",
|
|
|
240766 |
+ iscsi_get_error(iscsi));
|
|
|
240766 |
+ if (task) {
|
|
|
240766 |
+ scsi_free_scsi_task(task);
|
|
|
240766 |
return NULL;
|
|
|
240766 |
+ }
|
|
|
240766 |
+ return NULL;
|
|
|
240766 |
}
|
|
|
240766 |
|
|
|
240766 |
/*
|
|
|
240766 |
--
|
|
|
240766 |
1.7.1
|
|
|
240766 |
|