All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	armbru@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/5] block/backup: Add subclassed notifier
Date: Mon, 18 Jan 2016 11:20:54 -0500	[thread overview]
Message-ID: <569D10E6.4030102@redhat.com> (raw)
In-Reply-To: <20160118142900.GC4558@noname.redhat.com>



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 <jsnow@redhat.com>
>>>>>
>>>>> 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 <kwolf@redhat.com>
> 

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

  reply	other threads:[~2016-01-18 16:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12  0:36 [Qemu-devel] [PATCH 0/5] block: reduce reliance on bs->job pointer John Snow
2016-01-12  0:36 ` [Qemu-devel] [PATCH 1/5] block: Allow mirror_start to return job references John Snow
2016-01-12  0:36 ` [Qemu-devel] [PATCH 2/5] block: Allow stream_start " John Snow
2016-01-12  0:36 ` [Qemu-devel] [PATCH 3/5] block: allow backup_start " John Snow
2016-01-12  0:36 ` [Qemu-devel] [PATCH 4/5] block/backup: Add subclassed notifier John Snow
2016-01-12  8:46   ` Paolo Bonzini
2016-01-12 17:57     ` John Snow
2016-01-12 18:01       ` Paolo Bonzini
2016-01-12 18:02         ` John Snow
2016-01-18 14:29           ` Kevin Wolf
2016-01-18 16:20             ` John Snow [this message]
2016-01-12  0:36 ` [Qemu-devel] [PATCH 5/5] blockjob: add Job parameter to BlockCompletionFunc John Snow
2016-01-18 14:25   ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=569D10E6.4030102@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.