Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Aug 2006 11:52:44 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        "Kenneth D. Merry" <ken@freebsd.org>
Cc:        scsi@freebsd.org
Subject:   Re: O_NONBLOCK and /dev/passX devices..
Message-ID:  <200608151152.44365.jhb@freebsd.org>
In-Reply-To: <20060815132304.GA39025@nargothrond.kdm.org>
References:  <200608150815.57259.jhb@yahoo-inc.com> <20060815132304.GA39025@nargothrond.kdm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608151152.44365.jhb>