From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJLbs-0002WF-Ll for qemu-devel@nongnu.org; Sat, 02 Jul 2016 10:09:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJLbq-0000cB-Lr for qemu-devel@nongnu.org; Sat, 02 Jul 2016 10:09:27 -0400 References: <56dbc2694bbb89845a53f95426ef476fc4cb726f.1467386530.git.berto@igalia.com> From: Max Reitz Message-ID: Date: Sat, 2 Jul 2016 16:09:18 +0200 MIME-Version: 1.0 In-Reply-To: <56dbc2694bbb89845a53f95426ef476fc4cb726f.1467386530.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OSgTWpJrVBWm5S9e4KlwSIWqB0Jhx6Kl1" Subject: Re: [Qemu-devel] [PATCH v3 05/11] blockjob: Add 'job_id' parameter to block_job_create() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Eric Blake , Jeff Cody , John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OSgTWpJrVBWm5S9e4KlwSIWqB0Jhx6Kl1 From: Max Reitz To: Alberto Garcia , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Eric Blake , Jeff Cody , John Snow Message-ID: Subject: Re: [PATCH v3 05/11] blockjob: Add 'job_id' parameter to block_job_create() References: <56dbc2694bbb89845a53f95426ef476fc4cb726f.1467386530.git.berto@igalia.com> In-Reply-To: <56dbc2694bbb89845a53f95426ef476fc4cb726f.1467386530.git.berto@igalia.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 01.07.2016 17:52, Alberto Garcia wrote: > When a new job is created, the job ID is taken from the device name of > the BDS. This patch adds a new 'job_id' parameter to let the caller > provide one instead. >=20 > This patch also verifies that the ID is always unique and well-formed. > This causes problems in a couple of places where no ID is being set, > because the BDS does not have a device name. >=20 > In the case of test_block_job_start() (from test-blockjob-txn.c) we > can simply use this new 'job_id' parameter to set the missing ID. >=20 > In the case of img_commit() (from qemu-img.c) we still don't have the > API to make commit_active_start() set the job ID, so we solve it by > setting a default value. We'll get rid of this as soon as we extend > the API. >=20 > Signed-off-by: Alberto Garcia > --- > block/backup.c | 3 ++- > block/commit.c | 2 +- > block/mirror.c | 2 +- > block/stream.c | 2 +- > blockjob.c | 29 +++++++++++++++++++++++++---- > include/block/blockjob.h | 8 +++++--- > tests/test-blockjob-txn.c | 7 +++++-- > 7 files changed, 40 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz --OSgTWpJrVBWm5S9e4KlwSIWqB0Jhx6Kl1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEvBAEBCAAZBQJXd8sOEhxtcmVpdHpAcmVkaGF0LmNvbQAKCRA7sUIC6DisrbyF B/92We3/Bo8hgems7agjxKWb2CaY/68Ng+S2etccxzOLjB5x7jmd63QU/0hIXxA4 S6bX+y5XusfCTbpjORUrNEKfL2/VbsTOVH7PGyrsM1QPqsMgq3VpypN2oaPM1Kks pmteWn1f6IObwY7dRSJ00KNj3lRf00+hRw5Ii2PkXIdRg/ZuEeJURluwCdfYXifv FA212sibLuibX2N41FVjYBt0oZjRxBXlIuOS7Za3nQn0ZJ27pwe/kuQYgS1XmHiP 1mlto5p7hJPgNZqiKunp32EmI6IKRuY471rY3+HRLNju4D4S5+037/cXT7p8iMUv jAyyQQnJWy4M/q0GgKiI8SiC =LxFf -----END PGP SIGNATURE----- --OSgTWpJrVBWm5S9e4KlwSIWqB0Jhx6Kl1--