title: Are iocb requests passed to kernel evaluated in order or not?
body: <p>I read 2 posts related to Linux AIO (native AIO).</p>
  <ol>
  <li><a href="https://blog.cloudflare.com/io_submit-the-epoll-alternative-youve-never-heard-about/" rel="nofollow noreferrer">https://blog.cloudflare.com/io_submit-the-epoll-alternative-youve-never-heard-about/</a></li>
  </ol>
  <blockquote>
  <p>It's important to note the <code>iocb</code> requests passed to kernel are evaluated in-order sequentially.</p>
  </blockquote>
  <ol start="2">
  <li><a href="https://github.com/littledan/linux-aio" rel="nofollow noreferrer">https://github.com/littledan/linux-aio</a></li>
  </ol>
  <blockquote>
  <p><code>io_submit</code> allows an array of pointers to <code>struct iocbs</code> to be submitted all at once. In this function call, <code>nr</code> is the length of the <code>ios</code> array. If multiple operations are sent in one array, then no ordering guarantees are given between the <code>iocb</code>s.</p>
  </blockquote>
  <p>The 2. article uses <code>#include &lt;liaio.h&gt;</code> and as far as I know, it's merely a wrapper of Linux AIO system calls. So I am confused why one of the articles says &quot;in-order&quot; while another says &quot;no ordering guarantees&quot;?</p>
  <p>Which description is wrong? It would be appreciated if someone could provide a code snippet to test.</p>