From: Theodore Tso <tytso@mit.edu>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Bryan Henderson <hbryan@us.ibm.com>,
Andreas Dilger <adilger@clusterfs.com>,
"David H. Lynch Jr." <dhlii@comcast.net>,
linux-fsdevel@vger.kernel.org
Subject: Re: Read/write counts
Date: Mon, 4 Jun 2007 14:33:43 -0400 [thread overview]
Message-ID: <20070604183342.GC19224@thunk.org> (raw)
In-Reply-To: <20070604170223.GF23968@parisc-linux.org>
On Mon, Jun 04, 2007 at 11:02:23AM -0600, Matthew Wilcox wrote:
> On Mon, Jun 04, 2007 at 09:56:07AM -0700, Bryan Henderson wrote:
> > Programs that assume a full transfer are fairly common, but are
> > universally regarded as either broken or just lazy, and when it does cause
> > a problem, it is far more common to fix the application than the kernel.
>
> Linus has explicitly forbidden short reads from being returned. The
> original poster may get away with it for a specialised case, but for
> example, signals may not cause a return to userspace with a short read
> for exactly this reason.
Hmm, I'm not sure I would go that far. Per the POSIX specification,
we support the optional BSD-style restartable system calls for signals
which will avoid short reads; but this is only true if SA_RESTART is
passed to sigaction(). Without SA_RESTART, we will indeed return
short reads, as required by POSIX.
I don't think Linus has said that short reads are always evil; I
certainly can't remember him ever making that statement. Do you have
a pointer to a LKML message where he's said that?
- Ted
next prev parent reply other threads:[~2007-06-04 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 10:20 Read/write counts David H. Lynch Jr.
2007-06-04 16:33 ` Andreas Dilger
2007-06-04 16:56 ` Bryan Henderson
2007-06-04 17:02 ` Matthew Wilcox
2007-06-04 18:33 ` Theodore Tso [this message]
2007-06-04 18:57 ` Roman Zippel
2007-06-04 19:24 ` Joel Becker
2007-06-04 20:00 ` Theodore Tso
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=20070604183342.GC19224@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@clusterfs.com \
--cc=dhlii@comcast.net \
--cc=hbryan@us.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew@wil.cx \
/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.