qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 14/42] job: Add reference counting


From: Kevin Wolf
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 14/42] job: Add reference counting
Date: Tue, 15 May 2018 11:06:47 +0200
User-agent: Mutt/1.9.1 (2017-09-22)

Am 14.05.2018 um 23:34 hat John Snow geschrieben:
> 
> 
> On 05/09/2018 12:26 PM, Kevin Wolf wrote:
> > This moves reference counting from BlockJob to Job.
> > 
> > In order to keep calling the BlockJob cleanup code when the job is
> > deleted via job_unref(), introduce a new JobDriver.free callback. Every
> > block job must use block_job_free() for this callback, this is asserted
> > in block_job_create().
> > 
> > Signed-off-by: Kevin Wolf <address@hidden>
> 
> So far so good, though it does look a little silly that presently every
> last job has the exact same free callback.
> 
> Also, I forgot to reply to #13 with this, but I suppose that the
> approach you're taking -- of a fairly straightforward mechanical
> refactor -- means we don't really have the opportunity to change any of
> the pretty dumb names or existing peculiarities of design we've evolved.
> 
> I had hoped we'd be able to change a few things, but certainly keeping
> them as-is makes the whole re-factoring process an awful lot simpler...
> 
> ...Or maybe I'm getting ahead of myself, there's a lot of series left
> to go.

No, I think you're right. My approach was that we'd separate the generic
and the block-specific parts in this series without changing much in the
structure or the names, to keep the conversion as obvious as possible
(the series is long enough already).

However, I intentionally kept the QMP interface minimal where I wasn't
quite sure that we want to keep the old one. If you see anything in the
QMP interface that you'd like to see changed, please do comment.
Anything else is an implementation detail and can still be changed on
top of this series.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]