From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKSad-0002t0-DV for qemu-devel@nongnu.org; Mon, 03 Mar 2014 08:07:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKSaR-00078L-2k for qemu-devel@nongnu.org; Mon, 03 Mar 2014 08:07:27 -0500 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:38841 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKSaQ-000782-Or for qemu-devel@nongnu.org; Mon, 03 Mar 2014 08:07:15 -0500 Message-ID: <53147E75.6080203@kamp.de> Date: Mon, 03 Mar 2014 14:07:01 +0100 From: Peter Lieven 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> <53147CCF.1070600@redhat.com> In-Reply-To: <53147CCF.1070600@redhat.com> 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: Paolo Bonzini , Kevin Wolf Cc: Stefan Hajnoczi , "qemu-devel@nongnu.org" , Stefan Hajnoczi On 03.03.2014 13:59, Paolo Bonzini wrote: > 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. Thanks for the pointer. > > 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? Good point! > > Paolo Peter