From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpShN-00057T-Lq for qemu-devel@nongnu.org; Thu, 22 Oct 2015 23:07:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpShM-0006rG-O3 for qemu-devel@nongnu.org; Thu, 22 Oct 2015 23:07:21 -0400 Date: Fri, 23 Oct 2015 11:07:11 +0800 From: Fam Zheng Message-ID: <20151023030711.GA20424@ad.usersys.redhat.com> References: <1445495580-32129-1-git-send-email-famz@redhat.com> <1445495580-32129-12-git-send-email-famz@redhat.com> <20151022105345.GF3941@noname.redhat.com> <56294E34.1080805@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56294E34.1080805@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 11/12] qed: Implement .bdrv_drain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , jcody@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com On Thu, 10/22 22:59, Paolo Bonzini wrote: > > > On 22/10/2015 12:53, Kevin Wolf wrote: > > Am 22.10.2015 um 08:32 hat Fam Zheng geschrieben: > >> The "need_check_timer" is used to clear the "NEED_CHECK" flag in the > >> image header after a grace period once metadata update has finished. In > >> compliance to the bdrv_drain semantics we should make sure it remains > >> deleted once .bdrv_drain is called. > >> > >> We cannot reuse qed_need_check_timer_cb because it calls bdrv_aio_flush > >> with a completion callback that starts more I/O, bdrv_drain cannot cope > >> with this. > > > > For the record: I discussed this with Fam on IRC and we came to the > > conclusion that we should instead fix bdrv_drain() to correctly drain > > in-flight flushes. > > > > In order to achieve this, Fam will send a series that adds a > > BdrvTrackedRequest to all remaining asynchronous operations. So far we > > have identified flush, discard and aio_ioctl. At the same time he will > > send a rebased version of this series that goes back to asynchronous > > flushing in bdrv_qed_drain(). > > This is a completely separate bug. Can you at least merge all patches > except this, so that everything except QED can do snapshots with > dataplane? Of course there will be a v7 at least for patch 9. > So I'll drop the two patches for QED in v7, and let them follow the bdrv_drain fixing series. Actually, I think the current being of the QED timer doesn't change guest visible data - if the callback would dequeue more allocating requests (qed_unplug_allocating_write_reqs), the loop in bdrv_drain will wait for them. So it's not a big problem for the sake of transaction after all. Fam