Re: [PATCH] io_uring: don't set REQ_F_NOWAIT for regular files opend O_NONBLOCK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux