[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH v4 04/11] block: re-add BlkTransact
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [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
pgpEuZS9t9HDO.pgp
Description: PGP signature
[Qemu-devel] [PATCH v4 03/11] block: rename BlkTransactionState and BdrvActionOps, John Snow, 2015/05/11
[Qemu-devel] [PATCH v4 07/11] block: add delayed bitmap successor cleanup, John Snow, 2015/05/11