From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Mike Hayward <hayward@loup.net>
Cc: linux-kernel@vger.kernel.org, kasey.erickson@gmail.com
Subject: Re: O_NONBLOCK is NOOP on block devices
Date: Wed, 3 Mar 2010 11:50:12 +0000 [thread overview]
Message-ID: <20100303115012.51ac89c7@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <201003030826.o238QWXK015588@alien.loup.net>
> If O_NONBLOCK is meaningful whatsoever (see man page docs for
> semantics) against block devices, one would expect a nonblocking io
It isn't...
The manual page says "When possible, the file is opened in non-blocking
mode" . Your write is probably not blocking - but the memory allocation
for it is forcing other data to disk to make room. ie it didn't block it
was just "slow".
O_NONBLOCK on a regular file does influence how it responds to leases and
mandatory locks.
> probably be documented for clarity and it would be straight forward
> for it to return an error if these contradictory behaviors are
> simultaneously specified, unintentionally of course.
and risk breaking existing apps.
> Thoughts anyone?
Alan
next prev parent reply other threads:[~2010-03-03 11:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 8:26 Mike Hayward
2010-03-03 11:50 ` Alan Cox [this message]
2010-03-03 19:49 ` Mike Hayward
2010-03-03 21:25 ` Alan Cox
[not found] <4B904D98.50602@gmail.com>
2010-03-05 1:39 ` M vd S
2010-03-05 16:03 ` Jeff Moyer
2010-03-05 19:43 ` Mike Hayward
2010-03-10 0:50 ` M vd S
2010-03-10 13:21 ` Jeff Moyer
2010-03-10 17:09 ` M vd S
[not found] ` <201003102350.o2ANousd007794@alien.loup.net>
[not found] ` <4B983E88.5080901@gmail.com>
2010-03-11 7:41 ` Mike Hayward
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=20100303115012.51ac89c7@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=hayward@loup.net \
--cc=kasey.erickson@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®