From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZHCK-0000z6-FB for qemu-devel@nongnu.org; Fri, 16 Nov 2012 03:22:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZHCH-0005l8-DC for qemu-devel@nongnu.org; Fri, 16 Nov 2012 03:22:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZHCH-0005ka-5A for qemu-devel@nongnu.org; Fri, 16 Nov 2012 03:22:45 -0500 Message-ID: <50A5F7CF.1050205@redhat.com> Date: Fri, 16 Nov 2012 09:22:39 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1352992746-8767-1-git-send-email-stefanha@redhat.com> <1352992746-8767-2-git-send-email-stefanha@redhat.com> <87ip96y6og.fsf@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/7] raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , "Michael S. Tsirkin" , qemu-devel , Khoa Huynh , Stefan Hajnoczi , Asias He Il 16/11/2012 07:15, Stefan Hajnoczi ha scritto: >> > >> > So why not just make a string 'filename' property and open it directly >> > in virtio-blk-data-plane? Then it's at least clear to the user and >> > management tools what the device is capable of doing. > There are some benefits to raw_get_aio_fd(): > > 1. virtio-blk-data-plane is only a subset virtio-blk implementation, > it still needs a regular virtio-blk-pci device (with BDS) in order to > run. If we use a filename the user would have to specify it twice. > > 2. Fetching the file descriptor in this way ensures that the image > file is format=raw. > > 3. virtio-blk-data-plane uses Linux AIO and raw-posix.c has checks > which I don't want to duplicate - we can simply check s->use_aio in > raw_get_aio_fd() to confirm that Linux AIO can be used. Agreed. This is not vhost-blk, for which I agree that opening the file would make more sense (so you have no BDS at all). It's just a stopgap measure for something that should become the standard implementation. Paolo