mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
Merge pull request #6101 from liewegas/wip-fs
os/fs: fix do loop Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
de29da4973
@ -94,7 +94,7 @@ public:
|
|||||||
int submit(aio_t &aio, int *retries) {
|
int submit(aio_t &aio, int *retries) {
|
||||||
int attempts = 10;
|
int attempts = 10;
|
||||||
iocb *piocb = &aio.iocb;
|
iocb *piocb = &aio.iocb;
|
||||||
do {
|
while (true) {
|
||||||
int r = io_submit(ctx, 1, &piocb);
|
int r = io_submit(ctx, 1, &piocb);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
if (r == -EAGAIN && attempts-- > 0) {
|
if (r == -EAGAIN && attempts-- > 0) {
|
||||||
@ -105,7 +105,8 @@ public:
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
assert(r == 1);
|
assert(r == 1);
|
||||||
} while (false);
|
break;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user