From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQYwZ-00059U-8p for qemu-devel@nongnu.org; Fri, 12 Apr 2013 04:02:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQYwX-0000w1-8b for qemu-devel@nongnu.org; Fri, 12 Apr 2013 04:02:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQYwX-0000vl-17 for qemu-devel@nongnu.org; Fri, 12 Apr 2013 04:02:45 -0400 Date: Fri, 12 Apr 2013 10:02:02 +0200 From: Kevin Wolf Message-ID: <20130412080202.GB3426@dhcp-200-207.str.redhat.com> References: <1365695085-27970-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1365695085-27970-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Paolo Bonzini , Anthony Liguori , pingfank@linux.vnet.ibm.com, qemu-devel@nongnu.org Am 11.04.2013 um 17:44 hat Stefan Hajnoczi geschrieben: > Here's my entry to the "let's get rid of io_flush()" effort. It's based on > Paolo's insight about bdrv_drain_all() that the block layer already has a > tracked_requests list. io_flush() is redundant since the block layer already > knows if requests are pending. Except when there are requests that don't come from the guest, but are issued internally. In this case, block.c doesn't know about them, but only the block driver does, so we need a .bdrv_drain callback to tell the block layer about these. The one specific case that comes to mind is the QED timer for resetting the dirty bit. I think you need to have the .bdrv_drain callback before you can start ignoring .io_flush. Kevin