On 5/29/20 1:18 AM, Jiufei Xue wrote: > When read from a regular file that was opened O_NONBLOCK, it will > return EAGAIN if the page is not cached, which is not expected and > fails the application. > > Applications written before expect that the open flag O_NONBLOCK has > no effect on a regular file. > > Fix this by not setting REQ_F_NOWAIT for regular files. Agree, this also matches what we do for sockets. You need to update the comment as well, though. -- Jens Axboe