O_NONBLOCK and /dev/passX devices..
John Baldwin
jhb at freebsd.org
Tue Aug 15 16:00:15 UTC 2006
On Tuesday 15 August 2006 09:23, Kenneth D. Merry wrote:
> 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?
In this case it's a 3rd party Linux firmware app, so I think I'll just punt
for now as Scott has pointed out that there are likely far larger obstacles
ahead in its use of /dev/passX vs the Linux equivalent.
--
John Baldwin
More information about the freebsd-scsi
mailing list