O_NONBLOCK and /dev/passX devices..

Kenneth D. Merry ken at freebsd.org
Tue Aug 15 13:23:11 UTC 2006


On Tue, Aug 15, 2006 at 08:15:57 -0400, John Baldwin wrote:
> Is there a specific reasons that O_NONBLOCK isn't supported on
> /dev/passX devices?  Would it be hard to add support for that?

It depends.  What exactly are the semantics of O_NONBLOCK?  Does it only
apply on open, or on subsequent operations, like ioctl?

You're going to block for some period of time in almost every operation on
a pass device.  When you send a command down to a SCSI device, it'll take
some amount of time to complete.  It could be less than a second, or hours,
depending on the command, device and timeout.

We could probably come up with an async I/O type interface, where you'd get
notification of command completion, but not blocking with the current
interface probably wouldn't be practical, because most every request will
block.

What are you trying to do?

Ken
-- 
Kenneth Merry
ken at FreeBSD.org


More information about the freebsd-scsi mailing list