From owner-freebsd-scsi@FreeBSD.ORG Tue Aug 15 16:00:15 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E728D16A4E8; Tue, 15 Aug 2006 16:00:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 068AE43D49; Tue, 15 Aug 2006 16:00:13 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.0.1.107] (nat-outside.atlanta.corp.yahoo.com [63.172.193.57]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k7FG07LW028466; Tue, 15 Aug 2006 12:00:08 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Kenneth D. Merry" Date: Tue, 15 Aug 2006 11:52:44 -0400 User-Agent: KMail/1.9.1 References: <200608150815.57259.jhb@yahoo-inc.com> <20060815132304.GA39025@nargothrond.kdm.org> In-Reply-To: <20060815132304.GA39025@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608151152.44365.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [66.23.211.162]); Tue, 15 Aug 2006 12:00:09 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1664/Tue Aug 15 10:28:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.2 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: scsi@freebsd.org Subject: Re: O_NONBLOCK and /dev/passX devices.. X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 16:00:15 -0000 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