From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: qiwuchen55@gmail.com
Cc: adilger.kernel@dilger.ca, trivial@kernel.org,
linux-ext4@vger.kernel.org, chenqiwu <chenqiwu@xiaomi.com>
Subject: Re: [PATCH] ext4: remove trivial nowait check for buffered write
Date: Sat, 1 Feb 2020 17:49:51 -0500 [thread overview]
Message-ID: <20200201224951.GF528198@mit.edu> (raw)
In-Reply-To: <1580529639-26328-1-git-send-email-qiwuchen55@gmail.com>
On Sat, Feb 01, 2020 at 12:00:39PM +0800, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
>
> Remove trivial nowait check for ext4_buffered_write_iter(),
> since buffered writes will return -EINVAL if IOCB_NOWAIT
> passed in the follow-up function ext4_write_checks()->
> ext4_generic_write_checks()->generic_write_checks().
>
> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
The reason why we do this check here is so that we return immediately
and not potentially block when we call inode_lock(). Otherwise, an
AIO request with IOCB_NOWAIT could block, and that's not allowed.
- Ted
prev parent reply other threads:[~2020-02-01 22:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 4:00 [PATCH] ext4: remove trivial nowait check for buffered write qiwuchen55
2020-02-01 22:49 ` Theodore Y. Ts'o [this message]
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=20200201224951.GF528198@mit.edu \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=chenqiwu@xiaomi.com \
--cc=linux-ext4@vger.kernel.org \
--cc=qiwuchen55@gmail.com \
--cc=trivial@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).