From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7Tbm-0007V8-BX for qemu-devel@nongnu.org; Wed, 16 Jul 2014 14:07:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7Tbg-0006el-Ii for qemu-devel@nongnu.org; Wed, 16 Jul 2014 14:07:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7Tbg-0006dW-9y for qemu-devel@nongnu.org; Wed, 16 Jul 2014 14:07:08 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6GI77F5023536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 16 Jul 2014 14:07:07 -0400 Message-ID: <53C6BF4A.6010309@redhat.com> Date: Wed, 16 Jul 2014 12:07:06 -0600 From: Eric Blake MIME-Version: 1.0 References: <1405525697-9378-1-git-send-email-kwolf@redhat.com> <1405525697-9378-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1405525697-9378-2-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gsGfAf6mimj35GvdSSUtJxdRCAtLdRjTj" Subject: Re: [Qemu-devel] [PATCH 1/2] block: Add Error argument to bdrv_refresh_limits() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gsGfAf6mimj35GvdSSUtJxdRCAtLdRjTj Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/16/2014 09:48 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block.c | 33 +++++++++++++++++++++++---------- > block/iscsi.c | 3 +-- > block/qcow2.c | 4 +--- > block/qed.c | 4 +--- > block/raw-posix.c | 4 +--- > block/raw_bsd.c | 3 +-- > block/stream.c | 2 +- > block/vmdk.c | 4 +--- > include/block/block.h | 2 +- > include/block/block_int.h | 2 +- > 10 files changed, 32 insertions(+), 29 deletions(-) >=20 > /* Take some limits from the children as a default */ > if (bs->file) { > - bdrv_refresh_limits(bs->file); > + bdrv_refresh_limits(bs->file, &local_err); > + if (local_err) { > + error_propagate(errp, local_err); > + return; > + } Nice that you are no longer ignoring failure from the child. > @@ -1154,7 +1167,7 @@ void bdrv_set_backing_hd(BlockDriverState *bs, Bl= ockDriverState *backing_hd) > bdrv_op_unblock(bs->backing_hd, BLOCK_OP_TYPE_COMMIT, > bs->backing_blocker); > out: > - bdrv_refresh_limits(bs); > + bdrv_refresh_limits(bs, NULL); > } > =20 > /* > @@ -1778,7 +1791,7 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_s= tate) > BDRV_O_CACHE_WB); > reopen_state->bs->read_only =3D !(reopen_state->flags & BDRV_O_RDW= R); > =20 > - bdrv_refresh_limits(reopen_state->bs); > + bdrv_refresh_limits(reopen_state->bs, NULL); > +++ b/block/stream.c > @@ -76,7 +76,7 @@ static void close_unused_images(BlockDriverState *top= , BlockDriverState *base, > bdrv_unref(unused); > } > =20 > - bdrv_refresh_limits(top); > + bdrv_refresh_limits(top, NULL); > } > =20 Should these three callers be concerned about failure? If so, would &error_abort be better than NULL? But as for this patch, you are preserving existing semantics, so you could save it for a later patch. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gsGfAf6mimj35GvdSSUtJxdRCAtLdRjTj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTxr9KAAoJEKeha0olJ0NqOfsH/36jQqXCFFheeu+EzsJpX4by TKaHY5Y8D3IB3XajEDZi7Ue+pfss41PsJC8RFGrdJBvUCPyIgQ4vBreY04SQBOwr Q9VjbY7qWOnfC7r7AHldax0OaUYa82aXlCiCTjOaer3DYE4DbuBMmNwxL5ngxBrz zkwHHQBJlcBIrML3Ce7J5udSo9SuTG1T3L58k/8JIqAwbpPR2pLiI3tbsACf832/ nF3wt0GPNcOZMoniUjF16aQaKQrvWIwJllypcbxWu6YdHic4cQtKYhfJJGENka9o vwVgWCoff2dNEEWA3X7MMsPtGdn4UhPvbcHplb+l/IjXxIgA4MytKiArauJJ4iA= =OQAK -----END PGP SIGNATURE----- --gsGfAf6mimj35GvdSSUtJxdRCAtLdRjTj--