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
pgpOB2XrOMrsx.pgp
Description: PGP signature