From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjQ4a-0004vc-V5 for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:01:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjQ4V-000541-H9 for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:01:48 -0400 Received: from mail-lb0-x234.google.com ([2a00:1450:4010:c04::234]:40642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjQ4V-00053j-AC for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:01:43 -0400 Received: by mail-lb0-f180.google.com with SMTP id z12so2100721lbi.25 for ; Wed, 29 Oct 2014 03:01:42 -0700 (PDT) Date: Wed, 29 Oct 2014 10:01:38 +0000 From: Stefan Hajnoczi Message-ID: <20141029100138.GA19774@stefanha-thinkpad.redhat.com> References: <1414148280-17949-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <1414148280-17949-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 0/3] raw-posix: Fix raw_co_get_block_status() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 24, 2014 at 12:57:57PM +0200, Max Reitz wrote: > raw_co_get_block_status() should return 0 and set *pnum to 0 after the > EOF; currently it does this merely by accident, so implement it > directly. Also, nb_sectors should be clamped against the image end. >=20 > While doing that, centralize the generation of > raw_co_get_block_status()'s return value along the way. >=20 >=20 > v4: > - Patch 1: Use DIV_ROUND_UP() for the range until the image end instead > of truncating integer division [Eric] > - Patch 3: > - Use qemu-img resize -f raw instrad of truncate [Eric] > - Use qemu with HMP qemu-io instead of qemu-io itself; drop the > qemu-img test [Eric] >=20 >=20 > git-backport-diff against v3: >=20 > Key: > [----] : patches are identical > [####] : number of functional differences between upstream/downstream pat= ch > [down] : patch is downstream-only > The flags [FC] indicate (F)unctional and (C)ontextual differences, respec= tively >=20 > 001/3:[0002] [FC] 'raw-posix: Fix raw_co_get_block_status() after EOF' > 002/3:[----] [-C] 'raw-posix: raw_co_get_block_status() return value' > 003/3:[0021] [FC] 'iotests: Add test for external image truncation' >=20 > Max Reitz (3): > raw-posix: Fix raw_co_get_block_status() after EOF > raw-posix: raw_co_get_block_status() return value > iotests: Add test for external image truncation >=20 > block/raw-posix.c | 42 ++++++++++++++++++++++++----------------= -- > tests/qemu-iotests/102 | 21 +++++++++++++++++++-- > tests/qemu-iotests/102.out | 11 +++++++++++ > 3 files changed, 54 insertions(+), 20 deletions(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUULsCAAoJEJykq7OBq3PIkVYH/0wqErHsfmz2smALQgLTWVrW eOlU/DS7zoiBfRLcEMuogWtVfZY9Wn67yVpYlx+WlXpXFqITThL1UFY1JiLe2wsp 81uzIiaFFnW6Oo7EGt9kwHQv1wEdxnLRm+s0odkTQ/NwVKBdDgpukTN3DqYfOiX7 t6CyshHfeZICKsZ4omDhVYSske4dZ2UYAc1HJ/g1xO0Zh6GJJuUN1iRFEwhDNEr7 ABFmGFvnfCb+V+TxX+TaLHVbLyPcAsw22uXsM8hNyH/YwoQ/eYMIBs8M5OE36VoW NSIcH/87t8cva7tb48l2hJPMFjiGICFRJTAnx4Krtiiuow+bbGTatPo+ctBmsJM= =1jRj -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--