Messages in this thread | | | Date | Wed, 3 Mar 2010 11:50:12 +0000 | From | Alan Cox <> | Subject | Re: O_NONBLOCK is NOOP on block devices |
| |
> 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
| |