|
|
9ae3a8 |
From ae4902714a5ff8e905e69c25d48652a7a5e930f0 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 14 Apr 2014 09:59:22 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 06/12] iscsi: ignore flushes on scsi-generic devices
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1397469562-5050-1-git-send-email-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 58458
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 0day qemu-kvm PATCH v2 6/7] iscsi: ignore flushes on scsi-generic devices
|
|
|
9ae3a8 |
Bugzilla: 1083413
|
|
|
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 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1083413
|
|
|
9ae3a8 |
Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7342452
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Non-block SCSI devices do not support flushing, but we may still send
|
|
|
9ae3a8 |
them requests via bdrv_flush_all. Just ignore them.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Reviewed-by: Peter Lieven <pl@kamp.de>
|
|
|
9ae3a8 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit b2f9c08a4f11f16ec101e95feab8e71d7cfcfee9)
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Conflicts:
|
|
|
9ae3a8 |
block/iscsi.c
|
|
|
9ae3a8 |
Because upstream iscsi driver is converted to coroutine while
|
|
|
9ae3a8 |
downstream is aio. So the bdrv_flush code is different.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
v2: Schedule BH instead of returning NULL (which is interpreted as error
|
|
|
9ae3a8 |
for AIO). (Thanks Kevin)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/iscsi.c | 10 ++++++++++
|
|
|
9ae3a8 |
1 file changed, 10 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/iscsi.c | 10 ++++++++++
|
|
|
9ae3a8 |
1 files changed, 10 insertions(+), 0 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/iscsi.c b/block/iscsi.c
|
|
|
9ae3a8 |
index 268da2f..b80ebd3 100644
|
|
|
9ae3a8 |
--- a/block/iscsi.c
|
|
|
9ae3a8 |
+++ b/block/iscsi.c
|
|
|
9ae3a8 |
@@ -617,6 +617,16 @@ iscsi_aio_flush(BlockDriverState *bs,
|
|
|
9ae3a8 |
acb->iscsilun = iscsilun;
|
|
|
9ae3a8 |
acb->retries = ISCSI_CMD_RETRIES;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+ if (bs->sg) {
|
|
|
9ae3a8 |
+ acb->canceled = 0;
|
|
|
9ae3a8 |
+ acb->status = 0;
|
|
|
9ae3a8 |
+ acb->bh = NULL;
|
|
|
9ae3a8 |
+ acb->buf = NULL;
|
|
|
9ae3a8 |
+ acb->task = NULL;
|
|
|
9ae3a8 |
+ iscsi_schedule_bh(acb);
|
|
|
9ae3a8 |
+ return &acb->common;
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
if (iscsi_aio_flush_acb(acb) != 0) {
|
|
|
9ae3a8 |
qemu_aio_release(acb);
|
|
|
9ae3a8 |
return NULL;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|