From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWWy2-0004M9-Si for qemu-devel@nongnu.org; Mon, 31 Aug 2015 17:50:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWWy2-0005UX-10 for qemu-devel@nongnu.org; Mon, 31 Aug 2015 17:50:18 -0400 References: <1439939415-18180-1-git-send-email-mreitz@redhat.com> <1439939415-18180-6-git-send-email-mreitz@redhat.com> From: Eric Blake Message-ID: <55E4CC0E.3030601@redhat.com> Date: Mon, 31 Aug 2015 15:50:06 -0600 MIME-Version: 1.0 In-Reply-To: <1439939415-18180-6-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kdNIwpcDQdNceUIa58LGueCkivrWVskl3" Subject: Re: [Qemu-devel] [PATCH v4 5/6] block: Drop BlockDriverState.filename List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kdNIwpcDQdNceUIa58LGueCkivrWVskl3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/18/2015 05:10 PM, Max Reitz wrote: > That field is now only used during initialization of BlockDriverStates > (opening images) and for error or warning messages. Performance is not > that much of an issue here, so we can drop the field and replace its us= e > by a call to bdrv_filename() or bdrv_filename_alloc(). By doing so we > can ensure the result always to be recent, whereas the contents of > BlockDriverState.filename may have been obsoleted by manipulations of > single BlockDriverStates or of the BDS graph. >=20 > The users of the BDS filename field were changed as follows: > - copying the filename into another buffer is trivially replaced by > using bdrv_filename() instead of the copy function > - strdup() on the filename is replaced by a call to > bdrv_filename_alloc() > - bdrv_filename(bs, bs->filename, sizeof(bs->filename)) is replaced by > bdrv_refresh_filename(bs) > (these were introduced by the previous patch) > - anywhere else bdrv_filename_alloc() is used, any access to > BlockDriverState.filename is then replaced by the buffer returned, an= d > it is freed when it is no longer needed >=20 > Signed-off-by: Max Reitz > --- Looks like clean conversions. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --kdNIwpcDQdNceUIa58LGueCkivrWVskl3 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV5MwOAAoJEKeha0olJ0Nq4h0H/1uTY98YxPsUDj9+wfqFipi3 NuN1I34mUlgXIhbA5GkmVu+jKX0xHpC3p8tUewXOWSNZvjFQG5C19i+AMcbJO02F avbNbubWyddl24lBS1AKJqr/sKd8WU4flNThr1ZnnlGoqpG8ovDCIqo+xouEzwvo hVrUgl4mmkTn9m+atZBEgC6tq3Z7Y/wcf2A8+11x72LiwnUwQOzgYhetz62FtcBy VJmk28z2hczJHui1A4XgCKGT6xTiorpFXIS1rpCQvxt7uofVCp3HW/gHM3Xr6fHB VYIi9pbuQPRW0D5LZOPDpGOPq0DWx+AuaERmZTI/17P+B662TvQ9PN/3b93iBoA= =e8lT -----END PGP SIGNATURE----- --kdNIwpcDQdNceUIa58LGueCkivrWVskl3--