From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLCYB-0005Lh-N6 for qemu-devel@nongnu.org; Mon, 18 Jan 2016 11:21:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLCYA-0001So-SA for qemu-devel@nongnu.org; Mon, 18 Jan 2016 11:21:03 -0500 References: <1452558972-20316-1-git-send-email-jsnow@redhat.com> <1452558972-20316-5-git-send-email-jsnow@redhat.com> <5694BD4F.3000802@redhat.com> <56953E70.1080406@redhat.com> <56953F74.2040800@redhat.com> <56953FC5.7090502@redhat.com> <20160118142900.GC4558@noname.redhat.com> From: John Snow Message-ID: <569D10E6.4030102@redhat.com> Date: Mon, 18 Jan 2016 11:20:54 -0500 MIME-Version: 1.0 In-Reply-To: <20160118142900.GC4558@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/5] block/backup: Add subclassed notifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , armbru@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org On 01/18/2016 09:29 AM, Kevin Wolf wrote: > Am 12.01.2016 um 19:02 hat John Snow geschrieben: >> >> >> On 01/12/2016 01:01 PM, Paolo Bonzini wrote: >>> >>> >>> On 12/01/2016 18:57, John Snow wrote: >>>> >>>> >>>> On 01/12/2016 03:46 AM, Paolo Bonzini wrote: >>>>> >>>>> >>>>> On 12/01/2016 01:36, John Snow wrote: >>>>>> Instead of relying on peeking at bs->job, we want to explicitly get >>>>>> a reference to the job that was involved in this notifier callback. >>>>>> >>>>>> Extend the Notifier to include a job pointer, and include a reference >>>>>> to the job registering the callback. This cuts out a few more cases >>>>>> where we have to rely on bs->job. >>>>>> >>>>>> Signed-off-by: John Snow >>>>> >>>>> Why don't you just put the NotifierWithReturn inside the BackupBlockJob >>>>> struct, and use container_of to get from NWR to BackupBlockJob? >>>>> >>>>> Paolo >>>>> >>>> >>>> That's another way (including the notifier within the job vs. including >>>> the job within the notifier.) This one simply occurred to me first. Any >>>> strong benefit to that method, or just a matter of style? >>> >>> It's usually the one that is used with notifiers, no other reason. >> >> I'll follow convention, I just didn't bump into an example to model. > > This means that I should wait for a v2? (Hm, or is this Markus' area, > actually? Or Jeff's?) > > Otherwise, this series is: > Reviewed-by: Kevin Wolf > I hadn't re-rolled just yet, it seems like a matter of taste but I usually defer to convention for predictability's sake. Waiting for Jeff, primarily. --js