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

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



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