[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
pgpNzHqdj8ch9.pgp
Description: PGP signature
- [Qemu-block] [PATCH v4 00/11] block: incremental backup transactions, John Snow, 2015/05/11
- [Qemu-block] [PATCH v4 02/11] iotests: add transactional incremental backup test, John Snow, 2015/05/11
- [Qemu-block] [PATCH v4 04/11] block: re-add BlkTransactionState, John Snow, 2015/05/11
- Re: [Qemu-block] [PATCH v4 04/11] block: re-add BlkTransactionState,
Stefan Hajnoczi <=
- [Qemu-block] [PATCH v4 01/11] qapi: Add transaction support to block-dirty-bitmap operations, John Snow, 2015/05/11
- [Qemu-block] [PATCH v4 03/11] block: rename BlkTransactionState and BdrvActionOps, John Snow, 2015/05/11
- [Qemu-block] [PATCH v4 05/11] block: add transactional callbacks feature, John Snow, 2015/05/11
- [Qemu-block] [PATCH v4 06/11] block: add refcount to Job object, John Snow, 2015/05/11