From: Sean Fu <fxinrong@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>, Al Viro <viro@ZenIV.linux.org.uk>,
adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.
Date: Tue, 16 Jan 2018 16:10:33 +0800 [thread overview]
Message-ID: <20180116081033.GA3436@linux-zmni.apac.novell.com> (raw)
In-Reply-To: <20180110200255.GA6499@thunk.org>
On Wed, Jan 10, 2018 at 03:02:55PM -0500, Theodore Ts'o wrote:
> On Wed, Jan 10, 2018 at 10:01:49PM +0800, Sean Fu wrote:
> >
> > Correct, IOCB_NOWAIT read with zero count can return -EAGAIN, But I
> > think that it is reasonable. while it got lock, zero would be returned
> > in this case.
>
> Returning -EAGAIN and 0 are not the same thing. Specifically
> returning 0 means "end of file". Hence, it is NOT reasonable.
>
I know that two returnning value mean different things.
once the inode is not under lock contention, read again with zero count
would return zero.
> See the man page for read(2) or the relevant Single Unix Specification
> standard:
>
> RETURN VALUE
> On success, the number of bytes read is returned (zero indicates
> end of file)....
>
> Changing the behavior of the system in which will break userspace is
> never acceptable, and even more so given that this is just a "cleanup
> patch".
>
I agree with you at this point.
Thanks for your reply.
> - Ted
>
prev parent reply other threads:[~2018-01-16 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 8:19 Sean Fu
2018-01-03 2:08 ` Al Viro
2018-01-10 14:01 ` Sean Fu
2018-01-10 20:02 ` Theodore Ts'o
2018-01-16 8:10 ` Sean Fu [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=20180116081033.GA3436@linux-zmni.apac.novell.com \
--to=fxinrong@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@ZenIV.linux.org.uk \
/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
all inboxes | Powered by JetHome®