[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/43] block: fix return code for partial write for L
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 24/43] block: fix return code for partial write for Linux AIO |
Date: |
Tue, 5 Jul 2016 17:50:33 +0200 |
From: "Denis V. Lunev" <address@hidden>
Partial write most likely means that there is not space rather than
"something wrong happens". Thus it would be more natural to return
ENOSPC rather than EINVAL.
The problem actually happens with NBD server, which has reported EINVAL
rather then ENOSPC on the first error using its protocol, which makes
report to the user wrong.
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Pavel Borzenkov <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/linux-aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/linux-aio.c b/block/linux-aio.c
index e468960..7df8651 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -87,7 +87,7 @@ static void qemu_laio_process_completion(struct qemu_laiocb
*laiocb)
qemu_iovec_memset(laiocb->qiov, ret, 0,
laiocb->qiov->size - ret);
} else {
- ret = -EINVAL;
+ ret = -ENOSPC;
}
}
}
--
1.8.3.1
- [Qemu-devel] [PULL 15/43] block: Set default request_alignment during bdrv_refresh_limits(), (continued)
- [Qemu-devel] [PULL 15/43] block: Set default request_alignment during bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 17/43] block: Wording tweaks to write zeroes limits, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 14/43] block: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 16/43] block: Switch transfer length bounds to byte-based, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 13/43] raw-win32: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 18/43] block: Switch discard length bounds to byte-based, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 19/43] block: Drop raw_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 20/43] block: Split bdrv_merge_limits() from bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 24/43] block: fix return code for partial write for Linux AIO,
Kevin Wolf <=
- [Qemu-devel] [PULL 22/43] block: Fix error message style, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 27/43] blkreplay: Convert to byte-based I/O, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 21/43] block: Move request_alignment into BlockLimit, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 23/43] block: Use bool as appropriate for BDS members, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 25/43] block/qdev: Fix NULL access when using BB twice, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 26/43] vvfat: Use BdrvChild for s->qcow, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 28/43] vhdx: Some more BlockBackend use in vhdx_create(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 30/43] block: Convert bdrv_co_writev() to BdrvChild, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 29/43] block: Convert bdrv_co_readv() to BdrvChild, Kevin Wolf, 2016/07/05