aboutsummaryrefslogtreecommitdiff
path: root/block/iscsi.c
diff options
context:
space:
mode:
authorPeter Lieven <pl@kamp.de>2014-04-28 17:18:32 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-04-29 11:15:01 +0200
commit3d2acaa308bfab65329ef983654b302899bfb2b0 (patch)
tree83f433e25ec0aba8e1a183151c4d63b8b1e2e296 /block/iscsi.c
parent5917af812e9c4bd6500927b26efe8d3e2f267bd0 (diff)
block/iscsi: allow cluster_size of 4K and greater
depending on the target the opt_unmap_gran might be as low as 4K. As we know use this also as a knob to activate the allocationmap feature lower the barrier. The limit 4K (and not 512) is choosen to avoid a potentially too big allocationmap. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r--block/iscsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index e8d26bb781..84bedfa8fc 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1386,7 +1386,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
/* Guess the internal cluster (page) size of the iscsi target by the means
* of opt_unmap_gran. Transfer the unmap granularity only if it has a
* reasonable size */
- if (iscsilun->bl.opt_unmap_gran * iscsilun->block_size >= 64 * 1024 &&
+ if (iscsilun->bl.opt_unmap_gran * iscsilun->block_size >= 4 * 1024 &&
iscsilun->bl.opt_unmap_gran * iscsilun->block_size <= 16 * 1024 * 1024) {
iscsilun->cluster_sectors = (iscsilun->bl.opt_unmap_gran *
iscsilun->block_size) >> BDRV_SECTOR_BITS;