> Only members inside the chain are serialized. A chain of SQEs will be broken, if any request in that chain ends in error. io_uring considers any unexpected result an error. This means that, eg, a short read will also terminate the remainder of the chain. If a chain of SQE links is broken, the remaining unstarted part of the chain will be terminated and completed with -ECANCELED as the error code.
So it sounds like you would need to decide what your strategy is. It sounds like you can inspect the step in the sequence that had the error, learn what the error was, and decide whether you want to re-issue the command that failed along with the remainder of the sequence. For a short read, you should still have access to the bytes that were read, so you're not losing information due to the error.
There is an alternative "hardlink" concept that will continue the command sequence even in the presence of an error in the previous step, like a short read, as long as the previous step was correctly submitted.
Error handling gets in the way of some of the fun, as usual, but it is important to think about.
[0]: https://manpages.debian.org/unstable/liburing-dev/io_uring_e...
> The obvious place where BPF can add value is making decisions based on the outcome of previous operations in the ring. Currently, these decisions must be made in user space, which involves potential delays as the relevant process is scheduled and run. Instead, when an operation completes, a BPF program might be able to decide what to do next without ever leaving the kernel. "What to do next" could include submitting more I/O operations, moving on to the next in a series of files to process, or aborting a series of commands if something unexpected happens.
[0] https://github.com/checkpoint-restore/criu/blob/7686b939d155...
[1] https://github.com/checkpoint-restore/criu/blob/7686b939d155...
[2] https://github.com/checkpoint-restore/criu/blob/7686b939d155...
[3] https://www.infradead.org/~tgr/libnl/doc/api/group__qdisc__p...
But to answer your actual question, you can link requests and either abort or continue on failure.