qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v4 04/11] block: re-add BlkTransactionState


From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH v4 04/11] block: re-add BlkTransactionState
Date: Mon, 18 May 2015 13:33:36 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, May 11, 2015 at 07:04:19PM -0400, John Snow wrote:
> + * @jobs: A reference count that tracks how many jobs still need to complete.
> + * @actions: A list of all Actions in the Transaction.
> + */
> +typedef struct BlkTransactionState {
> +    int jobs;
...
> +static BlkTransactionState *new_blk_transaction_state(void)
> +{
> +    BlkTransactionState *bts = g_new0(BlkTransactionState, 1);
> +
> +    /* The qmp_transaction function itself can be considered a pending job
> +     * that should complete before pending action callbacks are executed,
> +     * so increment the jobs remaining refcount to indicate this. */
> +    bts->jobs = 1;

'refcnt' would be a clearer name for this field.  Then you can eliminate
the comment that explains why the field isn't really 'jobs'.

It's also the standard name for reference count fields in QEMU.

Stefan

Attachment: pgpNzHqdj8ch9.pgp
Description: PGP signature


reply via email to

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