From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2ebL-0007jp-RO for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:50:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2ebF-0006Sa-Mr for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:50:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2ebF-0006SW-EF for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:50:45 -0400 Message-ID: <53B5357A.5030001@redhat.com> Date: Thu, 03 Jul 2014 12:50:34 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1404303528-7115-1-git-send-email-ming.lei@canonical.com> <1404303528-7115-3-git-send-email-ming.lei@canonical.com> <20140703094009.GC4322@noname.redhat.com> <53B52ACA.4000900@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/3] linux-aio: implement io plug, unplug and flush io queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Peter Maydell , Fam Zheng , "Michael S. Tsirkin" , qemu-devel , Stefan Hajnoczi Il 03/07/2014 12:45, Ming Lei ha scritto: > I think it may be needed: > > - following requests coming inside handle_notify(): > req0, req1, req2-flush, req3 > - both req0 and req1 queued > - start to handle req2-flush > - bdrv_co_flush() calls bdrv_co_flush(bs->file), which finally > call raw_aio_flush() to send command, but the 1st two requests > should have been submitted to fs before the flush action No, bdrv_aio_flush is only guaranteed to flush requests that _completed_ before it was sent. Since we haven't yet told the guest that req0 and req1 are complete, there is no need to submit them before req2-flush. Paolo