Received: from eggs.gnu.org ([2001:4830:134:3::10]:52569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5EtZ-0002pY-NX for qemu-devel@nongnu.org; Tue, 24 May 2016 12:09:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5EtY-0007Ap-H3 for qemu-devel@nongnu.org; Tue, 24 May 2016 12:09:25 -0400 References: <1463470536-8981-1-git-send-email-famz@redhat.com> <1463470536-8981-7-git-send-email-famz@redhat.com> From: Max Reitz Message-ID: <16b7f2aa-3c9a-ae48-b2c1-b7a55e06510c@redhat.com> Date: Tue, 24 May 2016 18:09:13 +0200 MIME-Version: 1.0 In-Reply-To: <1463470536-8981-7-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6W9uWnm0dMju35jm2KNk7Vd7W9iTqtCnU" Subject: Re: [Qemu-devel] [PATCH v5 06/27] block: Make bdrv_reopen_{commit, abort} private functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , qemu-block@nongnu.org, berrange@redhat.com, pbonzini@redhat.com, den@openvz.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6W9uWnm0dMju35jm2KNk7Vd7W9iTqtCnU From: Max Reitz To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , Markus Armbruster , Eric Blake , John Snow , qemu-block@nongnu.org, berrange@redhat.com, pbonzini@redhat.com, den@openvz.org, stefanha@redhat.com Message-ID: <16b7f2aa-3c9a-ae48-b2c1-b7a55e06510c@redhat.com> Subject: Re: [PATCH v5 06/27] block: Make bdrv_reopen_{commit, abort} private functions References: <1463470536-8981-1-git-send-email-famz@redhat.com> <1463470536-8981-7-git-send-email-famz@redhat.com> In-Reply-To: <1463470536-8981-7-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 17.05.2016 09:35, Fam Zheng wrote: > As parts of the transactional reopen, they are not necessary outside > block.c. Make them static. >=20 > Signed-off-by: Fam Zheng > --- > block.c | 6 ++++-- > include/block/block.h | 2 -- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/block.c b/block.c > index 1b42303..ad3663c 100644 > --- a/block.c > +++ b/block.c > @@ -1943,6 +1943,8 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQu= eue *bs_queue, > * to all devices. > * > */ > +static void bdrv_reopen_commit(BDRVReopenState *reopen_state); > +static void bdrv_reopen_abort(BDRVReopenState *reopen_state); I'd rather put these declarations above the comment describing bdrv_reopen_multiple(); or just at the top of the file, we have two such declarations there already. Max > int bdrv_reopen_multiple(BlockReopenQueue *bs_queue, Error **errp) > { > int ret =3D -1; > @@ -2122,7 +2124,7 @@ error: > * makes them final by swapping the staging BlockDriverState contents = into > * the active BlockDriverState contents. > */ > -void bdrv_reopen_commit(BDRVReopenState *reopen_state) > +static void bdrv_reopen_commit(BDRVReopenState *reopen_state) > { > BlockDriver *drv; > =20 > @@ -2149,7 +2151,7 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_s= tate) > * Abort the reopen, and delete and free the staged changes in > * reopen_state > */ > -void bdrv_reopen_abort(BDRVReopenState *reopen_state) > +static void bdrv_reopen_abort(BDRVReopenState *reopen_state) > { > BlockDriver *drv; > =20 > diff --git a/include/block/block.h b/include/block/block.h > index 7a7dfb5..7740d3f 100644 > --- a/include/block/block.h > +++ b/include/block/block.h > @@ -228,8 +228,6 @@ int bdrv_reopen_multiple(BlockReopenQueue *bs_queue= , Error **errp); > int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp); > int bdrv_reopen_prepare(BDRVReopenState *reopen_state, > BlockReopenQueue *queue, Error **errp); > -void bdrv_reopen_commit(BDRVReopenState *reopen_state); > -void bdrv_reopen_abort(BDRVReopenState *reopen_state); > int bdrv_read(BlockDriverState *bs, int64_t sector_num, > uint8_t *buf, int nb_sectors); > int bdrv_write(BlockDriverState *bs, int64_t sector_num, >=20 --6W9uWnm0dMju35jm2KNk7Vd7W9iTqtCnU 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 iQEcBAEBCAAGBQJXRHypAAoJEDuxQgLoOKytkngH/Al0lXPvi8/b/LUrW44BVar8 8mnemIyEagVEfsWAGRJX2MfuJnWMVHPilrIvOrD739mzLhoLR9gsxPXgFG5P6kON o8LtZd/lAVxYMRo6NuzxZwoQfAW5ezcodBbmwSLdUoUZlvMo+qbreqb7UlwdI6zE zOpNo/GH0lyiteLGv3oKyh/lcfgcTyTE3KUiNuxp4e8Lu0VjxPnS1yJvmBTVvmz2 keR7EDCP9ah0S+qgEMlG93HT+esNCgZZEDPYH9PK/NpOWipY8+yuREHNKE7D66aP eoTaYSnYQ+fnAJcRYnW64c950LR+B3y1LzGb7WsZOw5c8nznQp0aLgTWaVjAB6Y= =Re/l -----END PGP SIGNATURE----- --6W9uWnm0dMju35jm2KNk7Vd7W9iTqtCnU--