bdev/uring: adjust to the latest io_uring API
Upstream liburing rename the io_uring_get_completion to io_uring_peek_ceq Signed-off-by: Honghui Wang <wanghonghui@ucloud.cn> Change-Id: I8f207b7b1255b44304f4eca4101b939847767179 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456959 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
a8c32ed5fe
commit
77509767c0
@ -206,7 +206,7 @@ bdev_uring_reap(struct io_uring *ring, int max)
|
|||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
for (i = 0; i < max; i++) {
|
for (i = 0; i < max; i++) {
|
||||||
ret = io_uring_get_completion(ring, &cqe);
|
ret = io_uring_peek_cqe(ring, &cqe);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -223,6 +223,7 @@ bdev_uring_reap(struct io_uring *ring, int max)
|
|||||||
}
|
}
|
||||||
|
|
||||||
uring_task->ch->group_ch->io_inflight--;
|
uring_task->ch->group_ch->io_inflight--;
|
||||||
|
io_uring_cqe_seen(ring, cqe);
|
||||||
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(uring_task), status);
|
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(uring_task), status);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user