From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKSTx-0006V7-6U for qemu-devel@nongnu.org; Mon, 03 Mar 2014 08:00:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKSTr-000573-0i for qemu-devel@nongnu.org; Mon, 03 Mar 2014 08:00:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKSTq-00056j-P6 for qemu-devel@nongnu.org; Mon, 03 Mar 2014 08:00:26 -0500 Message-ID: <53147CCF.1070600@redhat.com> Date: Mon, 03 Mar 2014 13:59:59 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <530DBE6C.5030502@kamp.de> <20140226154154.GB20820@stefanha-thinkpad.muc.redhat.com> <530E0FF0.20501@kamp.de> <20140227085711.GC21749@stefanha-thinkpad.redhat.com> <53109E99.3020102@kamp.de> <20140303103843.GB4850@dhcp-200-207.str.redhat.com> <53146596.90505@kamp.de> In-Reply-To: <53146596.90505@kamp.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qemu-img convert cache mode for source List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , Kevin Wolf Cc: Stefan Hajnoczi , "qemu-devel@nongnu.org" , Stefan Hajnoczi Il 03/03/2014 12:20, Peter Lieven ha scritto: >>> >> This #ifdef should be in the raw-posix driver. Please try to keep the >> qemu interface backend agnostic and leave POSIX_FADV_DONTNEED and >> friends as an implementation detail of block drivers. > I had the same idee, but as far as I see the callback to the completes > request is handled in block.c. raw-posix uses the aio interface and > not coroutines. You can put it in the QEMU_AIO_READ case of aio_worker. linux-aio.c is only for O_DIRECT, so you do not need it there. BTW, perhaps you need to exclude the fadvise if O_DIRECT is in use? Paolo