summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorHanna Reitz <hreitz@redhat.com>2021-08-12 10:41:48 +0200
committerHanna Reitz <hreitz@redhat.com>2021-09-15 15:54:07 +0200
commit9dbf6455f4f6bc59e68af033c5813c82d8a1ffff (patch)
tree463cd5dd29fbaba557c08e09b1d27ad11027736a
parent72b4cabe5e92b131dcb954691f579e59eb9103e3 (diff)
downloadfocaccia-qemu-9dbf6455f4f6bc59e68af033c5813c82d8a1ffff.tar.gz
focaccia-qemu-9dbf6455f4f6bc59e68af033c5813c82d8a1ffff.zip
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 <hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210812084148.14458-7-hreitz@redhat.com>
-rw-r--r--block/iscsi.c3
1 files changed, 0 insertions, 3 deletions
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);