X-Git-Url: https://git.proxmox.com/?p=ceph.git;a=blobdiff_plain;f=ceph%2Fsrc%2Fos%2Fbluestore%2Faio.cc;h=256f3db97fd551f2d8a91c8f533835db4b886bb5;hp=4996e73452b119a8c9c50085d5c858e71534ece5;hb=28e407b858acd3bddc89f68583571f771bb42e46;hpb=dfcb7b53b2e4fcd2a5af0240d4975adc711ab96e diff --git a/ceph/src/os/bluestore/aio.cc b/ceph/src/os/bluestore/aio.cc index 4996e7345..256f3db97 100644 --- a/ceph/src/os/bluestore/aio.cc +++ b/ceph/src/os/bluestore/aio.cc @@ -1,6 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab +#include #include "aio.h" #if defined(HAVE_LIBAIO) @@ -48,7 +49,7 @@ int aio_queue_t::submit_batch(aio_iter begin, aio_iter end, } int done = 0; while (left > 0) { - int r = io_submit(ctx, left, piocb + done); + int r = io_submit(ctx, std::min(left, max_iodepth), piocb + done); if (r < 0) { if (r == -EAGAIN && attempts-- > 0) { usleep(delay); @@ -61,6 +62,8 @@ int aio_queue_t::submit_batch(aio_iter begin, aio_iter end, assert(r > 0); done += r; left -= r; + attempts = 16; + delay = 125; } return done; }