From: Matthew Wilcox <willy@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dominique Martinet <asmadeus@codewreck.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
v9fs-developer@lists.sourceforge.net,
Sergey Alirzaev <l29ah@cock.li>
Subject: Re: [GIT PULL] 9p update for 5.7
Date: Mon, 6 Apr 2020 10:39:57 -0700 [thread overview]
Message-ID: <20200406173957.GI21484@bombadil.infradead.org> (raw)
In-Reply-To: <CAHk-=wiAiGMH=bw5N1nOVWYkE9=Pcx+mxyMwjYfGEt+14hFOVQ@mail.gmail.com>
On Mon, Apr 06, 2020 at 10:04:11AM -0700, Linus Torvalds wrote:
> On Mon, Apr 6, 2020 at 9:46 AM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > POSIX may well "allow" short reads, but userspace programmers basically
> > never check the return value from read(). Short reads aren't actually
> > allowed. That's why signals are only allowed to interrupt syscalls if
> > they're fatal (and the application will never see the returned value
> > because it's already dead).
>
> Well, that's true for some applications.
>
> But look at anybody who ever worked more with NFS mounts, and they got
> used to having the 'intr' mount flag set and incomplete reads and
> -EAGAIN as a result.
That's why you had me implement TASK_KILLABLE ;-)
> Are there apps that react badly? I'm sure - but they also wouldn't
> have O_NONBLOCK set on a regular file. The only reason to set
> O_NONBLOCK is because you think the fd might be a pipe or something,
> and you _are_ ready to get partial reads.
>
> So the 9p behavior certainly isn't outrageously out of line for a
> network filesystem. In fact, because of O_NONBLOCK rather than a mount
> option, I think it's a lot safer than a fairly standard NFS option.
The NFS option has been a no-op for over a decade ;-) I agree with you
that O_NONBLOCK is a good indicator the application is willing to handle
short reads (or indeed writes).
next prev parent reply other threads:[~2020-04-06 17:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 11:07 [GIT PULL] 9p update for 5.7 Dominique Martinet
2020-04-06 15:53 ` Linus Torvalds
2020-04-06 16:40 ` Dominique Martinet
2020-04-06 16:46 ` Matthew Wilcox
2020-04-06 16:55 ` Dominique Martinet
2020-04-06 17:04 ` Linus Torvalds
2020-04-06 17:39 ` Matthew Wilcox [this message]
2020-04-06 17:46 ` Linus Torvalds
2020-04-06 18:42 ` Dominique Martinet
2020-04-07 2:16 ` L29Ah
2020-04-07 6:31 ` Dominique Martinet
2020-04-07 17:59 ` Linus Torvalds
2020-04-06 16:45 ` pr-tracker-bot
2020-04-08 15:12 ` [GIT PULL v2] " Dominique Martinet
2020-04-09 4:53 ` Linus Torvalds
2020-04-09 4:55 ` pr-tracker-bot
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=20200406173957.GI21484@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=asmadeus@codewreck.org \
--cc=l29ah@cock.li \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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).