在 2021/9/7 下午11:24, Jens Axboe 写道:
On 9/7/21 9:16 AM, Hao Xu wrote:
check file_slot early in io_accept_prep() to avoid wasted effort in
failure cases.
It's generally better to just let the failure cases deal with it instead
of having checks in multiple places. This is a failure path, so we don't
care about making it fail early. Optimizations should be for the hot path,
which is not a malformed sqe.
I have a question here: if we do do_accept() and but fail in
io_install_fixed_file(), do we lose the conn_fd return by do_accept()
forever?