bdev/aio: Fix EAGAIN handling.
To test, build and run bdevperf against an arbitrary aio device with queue depth of 512 or more. Change-Id: I800a9ea529af9de22fddf50e1dafeefa2244122d Signed-off-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com> Reviewed-on: https://review.gerrithub.io/408709 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
2679d88a25
commit
55eb9617cf
@ -131,12 +131,12 @@ bdev_aio_readv(struct file_disk *fdisk, struct spdk_io_channel *ch,
|
||||
|
||||
rc = io_submit(aio_ch->io_ctx, 1, &iocb);
|
||||
if (rc < 0) {
|
||||
if (rc == EAGAIN) {
|
||||
if (rc == -EAGAIN) {
|
||||
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(aio_task), SPDK_BDEV_IO_STATUS_NOMEM);
|
||||
} else {
|
||||
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(aio_task), SPDK_BDEV_IO_STATUS_FAILED);
|
||||
SPDK_ERRLOG("%s: io_submit returned %d\n", __func__, rc);
|
||||
}
|
||||
SPDK_ERRLOG("%s: io_submit returned %d\n", __func__, rc);
|
||||
return -1;
|
||||
}
|
||||
aio_ch->io_inflight++;
|
||||
@ -161,12 +161,12 @@ bdev_aio_writev(struct file_disk *fdisk, struct spdk_io_channel *ch,
|
||||
|
||||
rc = io_submit(aio_ch->io_ctx, 1, &iocb);
|
||||
if (rc < 0) {
|
||||
if (rc == EAGAIN) {
|
||||
if (rc == -EAGAIN) {
|
||||
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(aio_task), SPDK_BDEV_IO_STATUS_NOMEM);
|
||||
} else {
|
||||
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(aio_task), SPDK_BDEV_IO_STATUS_FAILED);
|
||||
SPDK_ERRLOG("%s: io_submit returned %d\n", __func__, rc);
|
||||
}
|
||||
SPDK_ERRLOG("%s: io_submit returned %d\n", __func__, rc);
|
||||
return -1;
|
||||
}
|
||||
aio_ch->io_inflight++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user