From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxvKU-0001i9-ML for qemu-devel@nongnu.org; Thu, 28 May 2015 06:46:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxvKT-0005ba-Ob for qemu-devel@nongnu.org; Thu, 28 May 2015 06:46:26 -0400 Date: Thu, 28 May 2015 18:46:16 +0800 From: Fam Zheng Message-ID: <20150528104616.GA8461@dhcp-14-238.nay.redhat.com> References: <1432190583-10518-1-git-send-email-famz@redhat.com> <1432190583-10518-2-git-send-email-famz@redhat.com> <20150526142210.GI24077@noname.str.redhat.com> <55648220.1030206@redhat.com> <20150527090745.GA4669@noname.str.redhat.com> <55659372.9060804@redhat.com> <20150527101016.GB4669@noname.str.redhat.com> <55659FCC.2030704@redhat.com> <20150528024950.GC22609@dhcp-14-238.nay.redhat.com> <5566D076.8010807@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5566D076.8010807@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , qemu-block@nongnu.org, armbru@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi , amit.shah@redhat.com On Thu, 05/28 10:23, Paolo Bonzini wrote: > > > On 28/05/2015 04:49, Fam Zheng wrote: > > > > On a second thought, although in this series, we only need to modify > > virtio-{scsi,blk}, Wen pointed out that mirror job also wants this during > > completion (because bdrv_swap is in a BH after the job coroutine returns). > > Mirror needs to pause/resume the source. It doesn't need to handle > pause/resume of the target, does it? > > > So, in order for the solution to be general, and complete, this nofitier list > > approach relies on the listening devices to do the right thing, which requires > > modifying all of them, and is harder to maintain. > > Isn't it only devices that use aio_set_event_notifier for their ioeventfd? I think it's only the case for qmp_transaction, mirror job needs all block devices to implement pause: mirror_run guarantees source and target in sync when it returns; but bdrv_swap is deferred to a main loop bottom half - what if there is a guest write to source in between? Fam