• Jens Axboe's avatar
    io_uring: cache async and regular file state for fixed files · 7b29f92d
    Jens Axboe authored
    
    
    We have to dig quite deep to check for particularly whether or not a
    file supports a fast-path nonblock attempt. For fixed files, we can do
    this lookup once and cache the state instead.
    
    This adds two new bits to track whether we support async read/write
    attempt, and lines up the REQ_F_ISREG bit with those two. The file slot
    re-uses the last 3 (or 2, for 32-bit) of the file pointer to cache that
    state, and then we mask it in when we go and use a fixed file.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    7b29f92d
io_uring.c 243 KB