From 9dbf6455f4f6bc59e68af033c5813c82d8a1ffff Mon Sep 17 00:00:00 2001 From: Hanna Reitz Date: Thu, 12 Aug 2021 10:41:48 +0200 Subject: block/iscsi: Do not force-cap *pnum bdrv_co_block_status() does it for us, we do not need to do it here. The advantage of not capping *pnum is that bdrv_co_block_status() can cache larger data regions than requested by its caller. Signed-off-by: Hanna Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Message-Id: <20210812084148.14458-7-hreitz@redhat.com> --- block/iscsi.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'block') diff --git a/block/iscsi.c b/block/iscsi.c index 4d2a416ce7..852384086b 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -781,9 +781,6 @@ retry: iscsi_allocmap_set_allocated(iscsilun, offset, *pnum); } - if (*pnum > bytes) { - *pnum = bytes; - } out_unlock: qemu_mutex_unlock(&iscsilun->mutex); g_free(iTask.err_str); -- cgit v1.2.3