From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2Hpz-0006BB-By for qemu-devel@nongnu.org; Tue, 09 Jun 2015 07:37:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2Hpy-0004Qg-2S for qemu-devel@nongnu.org; Tue, 09 Jun 2015 07:36:59 -0400 Message-ID: <5576CFCC.90309@redhat.com> Date: Tue, 09 Jun 2015 05:36:44 -0600 From: Eric Blake MIME-Version: 1.0 References: <1433840108-9996-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1433840108-9996-1-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hOmnEreSOt5PNcDenDtTAnnfICCJ8S8VU" Subject: Re: [Qemu-devel] [PATCH] raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: pbonzini@redhat.com, crobinso@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, eharney@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hOmnEreSOt5PNcDenDtTAnnfICCJ8S8VU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/09/2015 02:55 AM, Kevin Wolf wrote: > Image files with an unaligned image size have a final hole that starts > at EOF, i.e. in the middle of a sector. Currently, *pnum =3D=3D 0 is > returned when checking the status of this sector. In qemu-img, this > triggers an assertion failure. >=20 > In order to fix this, one type for the sector that contains EOF must be= > found. Treating a hole as data is safe, so this patch rounds the > calculated number of data sectors up, so that a partial sector at EOF i= s > treated as a full data sector. >=20 > This fixes https://bugzilla.redhat.com/show_bug.cgi?id=3D1229394 >=20 > Signed-off-by: Kevin Wolf > --- > block/raw-posix.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hOmnEreSOt5PNcDenDtTAnnfICCJ8S8VU 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/ iQEcBAEBCAAGBQJVds/MAAoJEKeha0olJ0Nq0A4H/iKJ1CK4p1tlrpGQOrGL3h6y 5BY7ztSAI20sPNxMnCxmnC21DWyhIgw5x/7j00rX+4I6NawknIrzQ5AwZpGP9rYl ZjROsjn1tfSMvHq+5mY4t5/SkbTpmiP7GWclabqFEjB5Mz1tCl6B4BgfJVFG+pFQ H6wca2eAkOFtYS+AvYen1sgl8JWWNXrhtbaLkARuJfXZNGA1cGx9I3Hw2DRtjM5r r3cSu3n43xMEY6ZVyck6N02ggLDgvnfjPvBDlAPWsZfhpYtFVwCotSVv1xvY1a54 924PZMRFlrVRdJOjMQeMl3A031pmmFfKhBhxECdwVT1H7kRwNHBuruihADje5yI= =Y65p -----END PGP SIGNATURE----- --hOmnEreSOt5PNcDenDtTAnnfICCJ8S8VU--