From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6nKQ-0006pI-5C for qemu-devel@nongnu.org; Wed, 20 May 2009 11:03:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6nKL-0006li-15 for qemu-devel@nongnu.org; Wed, 20 May 2009 11:03:33 -0400 Received: from [199.232.76.173] (port=57038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6nKK-0006lC-P7 for qemu-devel@nongnu.org; Wed, 20 May 2009 11:03:28 -0400 Received: from verein.lst.de ([213.95.11.210]:49560) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1M6nKJ-0002Dy-UL for qemu-devel@nongnu.org; Wed, 20 May 2009 11:03:28 -0400 Date: Wed, 20 May 2009 17:03:20 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] block/raw-posix.c:hdev_create() on FreeBSD and in general Message-ID: <20090520150320.GA2844@lst.de> References: <20090520080723.GA2957@lst.de> <20090520.084124.1715680382.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090520.084124.1715680382.imp@bsdimp.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "M. Warner Losh" Cc: nolan@sigbus.net, qemu-devel@nongnu.org On Wed, May 20, 2009 at 08:41:24AM -0600, M. Warner Losh wrote: > : Also I think we should allow creating the host devices on all supported > : operating systems. For Linux we should use block devices, for FreeBSD > : always char devices. For the other BSDs and Solaris do we allow only > : block or also the raw char devices? Not sure if they actually support > : O_DIRECT for block devices nodes which pretty much is a Linux-ism so > : for cache=none at least we should probably open the raw nodes.. > > Other BSDs still have block devices. O_DIRECT is supported in at > least NetBSD (and FreeBSD). Well, O_DIRECT on block devices. On Linux a block device opened with O_DIRECT is the equivalent to the traditional BSD raw devices. My last look at freebsd was that there is no support for buffered access to block device at all since the removal of the block device nodes. And I wonder if NetBSD support that concept even if it generally does support O_DIRECT. It seems like our option parsing for host devices currently is pretty Linux-specific :)