[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] block/backup: Add subclassed n
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] block/backup: Add subclassed notifier |
Date: |
Mon, 18 Jan 2016 15:29:00 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> >>>
> >>> 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 <address@hidden>
[Qemu-block] [PATCH 1/5] block: Allow mirror_start to return job references, John Snow, 2016/01/11
[Qemu-block] [PATCH 5/5] blockjob: add Job parameter to BlockCompletionFunc, John Snow, 2016/01/11
[Qemu-block] [PATCH 3/5] block: allow backup_start to return job references, John Snow, 2016/01/11