All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Jiufei Xue <jiufei.xue@linux.alibaba.com>, io-uring@vger.kernel.org
Cc: joseph.qi@linux.alibaba.com
Subject: Re: [PATCH] io_uring: don't set REQ_F_NOWAIT for regular files opend O_NONBLOCK
Date: Fri, 29 May 2020 08:20:01 -0600	[thread overview]
Message-ID: <df16e843-6b02-e51f-c99d-9886ead20943@kernel.dk> (raw)
In-Reply-To: <1590736708-99812-1-git-send-email-jiufei.xue@linux.alibaba.com>

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


  reply	other threads:[~2020-05-29 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  7:18 [PATCH] io_uring: don't set REQ_F_NOWAIT for regular files opend O_NONBLOCK Jiufei Xue
2020-05-29 14:20 ` Jens Axboe [this message]
2020-06-01  3:26   ` Jiufei Xue
2020-06-10  6:16     ` Jiufei Xue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df16e843-6b02-e51f-c99d-9886ead20943@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=jiufei.xue@linux.alibaba.com \
    --cc=joseph.qi@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.