Received: from eggs.gnu.org ([2001:4830:134:3::10]:44957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuKEu-000059-U6 for qemu-devel@nongnu.org; Mon, 18 May 2015 08:33:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuKEt-00049Z-RE for qemu-devel@nongnu.org; Mon, 18 May 2015 08:33:48 -0400 Date: Mon, 18 May 2015 13:33:36 +0100 From: Stefan Hajnoczi Message-ID: <20150518123336.GC24319@stefanha-thinkpad.redhat.com> References: <1431385466-4868-1-git-send-email-jsnow@redhat.com> <1431385466-4868-5-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uh9ZiVrAOUUm9fzH" Content-Disposition: inline In-Reply-To: <1431385466-4868-5-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v4 04/11] block: re-add BlkTransactionState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: famz@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, vsementsov@parallels.com, stefanha@redhat.com --uh9ZiVrAOUUm9fzH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --uh9ZiVrAOUUm9fzH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVWdwgAAoJEJykq7OBq3PIT0sH/jFKJHxPoJtVdmWpBEPeeDYL S978b5NEZZov+gsdd/JShQu0ZxGZOd+xdTb0k65Y3FYonD+0Oy9fFIRpJzKW9RRY 2Lnpc+QkiDsBnMYLJYEAEl3YZ6vNTm7IMwPqKCwshojZH1tLWO78J4S98aBkWw5l v15sp0WIez/rf12RwX+EFOxBcO9kQDMsfb8+SpKHLhFB7LPI/dor0ghrhYoMrGaS //SEoCJu3DL/Z6WZ5a7ctHbSP1xpmJnVZqc7yysjTSGVTylRaVfMcHl9nh3AYfqk 3CFjEwa9iihYdzpro7DOkatzXXU5N5A/qfjXtyM8fBiBmHO66m50KcPfFLcr+6o= =36lF -----END PGP SIGNATURE----- --uh9ZiVrAOUUm9fzH--