|
|
9ae3a8 |
From a9bf8d1acc8589ebda4fb96acd08822a7937af9b Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
Message-Id: <a9bf8d1acc8589ebda4fb96acd08822a7937af9b.1389014116.git.minovotn@redhat.com>
|
|
|
9ae3a8 |
In-Reply-To: <c8cc35838d42aa286242772d97e3a9be7bb786ba.1389014116.git.minovotn@redhat.com>
|
|
|
9ae3a8 |
References: <c8cc35838d42aa286242772d97e3a9be7bb786ba.1389014116.git.minovotn@redhat.com>
|
|
|
9ae3a8 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 9 Dec 2013 14:09:04 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 16/50] iscsi: set limits in BlockDriverState
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1386598178-11845-19-git-send-email-pbonzini@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56055
|
|
|
9ae3a8 |
O-Subject: [RHEL 7.0 qemu-kvm PATCH 18/52] iscsi: set limits in BlockDriverState
|
|
|
9ae3a8 |
Bugzilla: 1007815
|
|
|
9ae3a8 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Peter Lieven <pl@kamp.de>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Peter Lieven <pl@kamp.de>
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit ba6c59191f245147e7ee0c2b9ecaf5fb116f7877)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/iscsi.c | 14 ++++++++++++++
|
|
|
9ae3a8 |
1 file changed, 14 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Michal Novotny <minovotn@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/iscsi.c | 14 ++++++++++++++
|
|
|
9ae3a8 |
1 file changed, 14 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/iscsi.c b/block/iscsi.c
|
|
|
9ae3a8 |
index 1e8a2bb..e5f4670 100644
|
|
|
9ae3a8 |
--- a/block/iscsi.c
|
|
|
9ae3a8 |
+++ b/block/iscsi.c
|
|
|
9ae3a8 |
@@ -1386,6 +1386,20 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
|
|
|
9ae3a8 |
sizeof(struct scsi_inquiry_block_limits));
|
|
|
9ae3a8 |
scsi_free_scsi_task(task);
|
|
|
9ae3a8 |
task = NULL;
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ if (iscsilun->bl.max_unmap < 0xffffffff) {
|
|
|
9ae3a8 |
+ bs->bl.max_discard = sector_lun2qemu(iscsilun->bl.max_unmap,
|
|
|
9ae3a8 |
+ iscsilun);
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
+ bs->bl.discard_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran,
|
|
|
9ae3a8 |
+ iscsilun);
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+ if (iscsilun->bl.max_ws_len < 0xffffffff) {
|
|
|
9ae3a8 |
+ bs->bl.max_write_zeroes = sector_lun2qemu(iscsilun->bl.max_ws_len,
|
|
|
9ae3a8 |
+ iscsilun);
|
|
|
9ae3a8 |
+ }
|
|
|
9ae3a8 |
+ bs->bl.write_zeroes_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran,
|
|
|
9ae3a8 |
+ iscsilun);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
#if defined(LIBISCSI_FEATURE_NOP_COUNTER)
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.11.7
|
|
|
9ae3a8 |
|