[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/42] block/iscsi: return -ENOMEM if an async call f
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 05/42] block/iscsi: return -ENOMEM if an async call fails immediately |
Date: |
Wed, 15 Jan 2014 11:22:18 +0100 |
From: Peter Lieven <address@hidden>
if an async libiscsi call fails directly it can only be due
to an out of memory condition. All other errors are returned
through the callback.
Signed-off-by: Peter Lieven <address@hidden>
Reviewed-by: Ronnie Sahlberg <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/iscsi.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index c0ea0c4..76b3c96 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -308,7 +308,7 @@ retry:
iscsi_co_generic_cb, &iTask);
if (iTask.task == NULL) {
g_free(buf);
- return -EIO;
+ return -ENOMEM;
}
#if defined(LIBISCSI_FEATURE_IOVECTOR)
scsi_task_set_iov_out(iTask.task, (struct scsi_iovec *) iov->iov,
@@ -376,7 +376,7 @@ retry:
break;
}
if (iTask.task == NULL) {
- return -EIO;
+ return -ENOMEM;
}
#if defined(LIBISCSI_FEATURE_IOVECTOR)
scsi_task_set_iov_in(iTask.task, (struct scsi_iovec *) iov->iov,
iov->niov);
@@ -419,7 +419,7 @@ static int coroutine_fn iscsi_co_flush(BlockDriverState *bs)
retry:
if (iscsi_synchronizecache10_task(iscsilun->iscsi, iscsilun->lun, 0, 0, 0,
0, iscsi_co_generic_cb, &iTask) == NULL)
{
- return -EIO;
+ return -ENOMEM;
}
while (!iTask.complete) {
@@ -669,7 +669,7 @@ retry:
sector_qemu2lun(sector_num, iscsilun),
8 + 16, iscsi_co_generic_cb,
&iTask) == NULL) {
- ret = -EIO;
+ ret = -ENOMEM;
goto out;
}
@@ -753,7 +753,7 @@ coroutine_fn iscsi_co_discard(BlockDriverState *bs, int64_t
sector_num,
retry:
if (iscsi_unmap_task(iscsilun->iscsi, iscsilun->lun, 0, 0, &list, 1,
iscsi_co_generic_cb, &iTask) == NULL) {
- return -EIO;
+ return -ENOMEM;
}
while (!iTask.complete) {
@@ -822,7 +822,7 @@ retry:
iscsilun->zeroblock, iscsilun->block_size,
nb_blocks, 0, !!(flags & BDRV_REQ_MAY_UNMAP),
0, 0, iscsi_co_generic_cb, &iTask) == NULL) {
- return -EIO;
+ return -ENOMEM;
}
while (!iTask.complete) {
--
1.8.1.4
- [Qemu-devel] [PULL 00/42] Block patches, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 01/42] rbd: switch from pipe to QEMUBH completion notification, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 05/42] block/iscsi: return -ENOMEM if an async call fails immediately,
Kevin Wolf <=
- [Qemu-devel] [PULL 02/42] qemu-iotests: Introduce _unsupported_imgopts, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 03/42] qemu-iotests: Add _unsupported_imgopts for vmdk subformats, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 04/42] qemu-iotests: Clean up all extents for vmdk, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 06/42] gluster: Convert aio routines into coroutines, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 09/42] sheepdog: fix clone operation by 'qemu-img create -b', Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 07/42] gluster: Implement .bdrv_co_write_zeroes for gluster, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 11/42] docs: qcow2 compat=1.1 is now the default, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 13/42] readline: decouple readline from the monitor, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 08/42] gluster: Add support for creating zero-filled image, Kevin Wolf, 2014/01/15
- [Qemu-devel] [PULL 12/42] vmdk: Fix big flat extent IO, Kevin Wolf, 2014/01/15