[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 14/42] job: Add reference counting
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH 14/42] job: Add reference counting |
Date: |
Mon, 14 May 2018 17:34:21 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
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.
Ah, anyway:
Reviewed-by: John Snow <address@hidden>