Martin Pool's blog

Async disk access

Courtesy of slamb, pphaneuf.

richdawe:

No POSIX system supports non-blocking disk I/O through the O_NONBLOCK interface. Some support it through a separate asynchronous I/O interface but due to its complexity and non-portability, few programs actually use it. Also, it doesn't support an async open(2).

djb argues, like you do, that they should support this through a more normal mechanism.

Why is it so hard to just do O_NONBLOCK on disk files, as you can do on pipes or sockets? Because Linux disk IO is fundamentally different, because of being so tightly integrated with the virtual memory system.

Related stuff from Christopher Baus.

Archives 2008: Apr Feb 2007: Jul May Feb Jan 2006: Dec Nov Oct Sep Aug Jul Jun Jan 2005: Sep Aug Jul Jun May Apr Mar Feb Jan 2004: Dec Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan 2003: Dec Nov Oct Sep Aug Jul Jun May