From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkYeU-0005Dl-Nx for qemu-devel@nongnu.org; Wed, 14 May 2014 08:51:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkYeO-0003tx-Ia for qemu-devel@nongnu.org; Wed, 14 May 2014 08:51:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkYeO-0003ts-B3 for qemu-devel@nongnu.org; Wed, 14 May 2014 08:51:12 -0400 Message-ID: <53736716.9040204@redhat.com> Date: Wed, 14 May 2014 14:52:38 +0200 From: Peter Krempa MIME-Version: 1.0 References: <1399662217-31148-1-git-send-email-stefanha@redhat.com> <1399662217-31148-13-git-send-email-stefanha@redhat.com> <5370F1AB.2070502@redhat.com> <20140514123639.GC16683@stefanha-thinkpad.redhat.com> In-Reply-To: <20140514123639.GC16683@stefanha-thinkpad.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5NDwv3cd06d5qv5QNCwwtXdRiCrCjjoQL" Subject: Re: [Qemu-devel] [PULL 12/17] gluster: Correctly propagate errors when volume isn't accessible List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Peter Maydell , qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5NDwv3cd06d5qv5QNCwwtXdRiCrCjjoQL Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/14/14 14:36, Stefan Hajnoczi wrote: > On Mon, May 12, 2014 at 10:07:07AM -0600, Eric Blake wrote: >> On 05/09/2014 01:03 PM, Stefan Hajnoczi wrote: >>> From: Peter Krempa >>> >>> The docs for glfs_init suggest that the function sets errno on every >>> failure. In fact it doesn't. As other functions such as >>> qemu_gluster_open() in the gluster block code report their errors bas= ed >>> on this fact we need to make sure that errno is set on each failure. >>> >>> This fixes a crash of qemu-img/qemu when a gluster brick isn't >>> accessible from given host while the server serving the volume >>> description is. >>> >>> Thread 1 (Thread 0x7ffff7fba740 (LWP 203880)): >>> #0 0x00007ffff77673f8 in glfs_lseek () from /usr/lib64/libgfapi.so.= 0 >>> #1 0x0000555555574a68 in qemu_gluster_getlength () >>> #2 0x0000555555565742 in refresh_total_sectors () >>> #3 0x000055555556914f in bdrv_open_common () >>> #4 0x000055555556e8e8 in bdrv_open () >>> #5 0x000055555556f02f in bdrv_open_image () >>> #6 0x000055555556e5f6 in bdrv_open () >>> #7 0x00005555555c5775 in bdrv_new_open () >>> #8 0x00005555555c5b91 in img_info () >>> #9 0x00007ffff62c9c05 in __libc_start_main () from /lib64/libc.so.6= >>> #10 0x00005555555648ad in _start () >>> >>> Signed-off-by: Stefan Hajnoczi >>> --- >> >> Isn't this missing S-o-b from Peter? >=20 > Good catch. Peter, can you send your Signed-off-by: please? >=20 > Stefan >=20 As this patch was already pulled to master as: commit 4557117d9eed8cadc360aec23b42fc39a7011864 Author: Peter Krempa Date: Fri May 9 12:08:10 2014 +0200 gluster: Correctly propagate errors when volume isn't accessible =20 The docs for glfs_init suggest that the function sets errno on every failure. In fact it doesn't. As other functions such as qemu_gluster_open() in the gluster block code report their errors bas= ed on this fact we need to make sure that errno is set on each failure. =20 This fixes a crash of qemu-img/qemu when a gluster brick isn't accessible from given host while the server serving the volume description is. =20 Thread 1 (Thread 0x7ffff7fba740 (LWP 203880)): #0 0x00007ffff77673f8 in glfs_lseek () from /usr/lib64/libgfapi.so.= 0 #1 0x0000555555574a68 in qemu_gluster_getlength () #2 0x0000555555565742 in refresh_total_sectors () #3 0x000055555556914f in bdrv_open_common () #4 0x000055555556e8e8 in bdrv_open () #5 0x000055555556f02f in bdrv_open_image () #6 0x000055555556e5f6 in bdrv_open () #7 0x00005555555c5775 in bdrv_new_open () #8 0x00005555555c5b91 in img_info () #9 0x00007ffff62c9c05 in __libc_start_main () from /lib64/libc.so.6= #10 0x00005555555648ad in _start () =20 Signed-off-by: Stefan Hajnoczi I'm explicitly expressing my signoff here: Signed-off-by: Peter Krempa Sorry for the hassle. Peter --5NDwv3cd06d5qv5QNCwwtXdRiCrCjjoQL 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.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTc2cWAAoJEDbsFqzQGGgr40QQAJ8aa/ZwxmORytWasKHR5Kb/ I5VG6JOUxXBT2+zO8vr9FPFDGsb7BR4FFh/5AHcv5TPSo3rYJtfXKjzRJOjaX7i/ YLHmXCTMCYQXY+DatkcJzQZqdVgUcsqvjEgD8CQG51xoGaKzrafehJQSzQMY6nS3 J1F6oqECT9b9KEjTLb4ukbs1bUcsvNs4K05iqNNKLMoGM+Iuj2MZcowVWwyddQmJ e1GGCifQ9vzVzlbSICYAWhdLZjekYHKta2xP1RC3rKlrgrMR4f5hmpvA6EfRvKmf aFY0oVkjxDIsv21VH9ai3Ms5CqKwCXPNvMEmsKm8WepXgJJ2h/CPNd7Mo339kLuY 1SbDB3/cEWlOY9NWx6+NIQ/ggRNc9GtEXu7uVjKYnyP0zrzZX7nv/G9MaptOWfks O/Qs2+QvgwMyY2YosPmdA1gsXUZIJrEl0rMWV6Eal4WDXSa1NtAaq84M1vzKnPCh HfDOKLotMxtzBw5xP6YgU96IZt33QbsRqwJ8TPGg5opsDniSXImYQOFFSbCHOHkH OPSKj8RpbBBIu3wqmBvKGDhBzOleF15Oa3T8ZfIckzqXzVQ6MRYKkEcqjomoGzy7 svrbkHGNPBy3OlSCmt2mzyYSTPUQ0/P2w+yiq466Iwoper+vDFiMZOpPI0+d9Hc2 VBGS0Occ6whLxz1DbPnc =WOGL -----END PGP SIGNATURE----- --5NDwv3cd06d5qv5QNCwwtXdRiCrCjjoQL--