Received: from eggs.gnu.org ([2001:4830:134:3::10]:42853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXXWu-00041n-Cd for qemu-devel@nongnu.org; Wed, 10 Aug 2016 13:43:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXXWs-0000Ox-BO for qemu-devel@nongnu.org; Wed, 10 Aug 2016 13:42:59 -0400 References: <20160810150344.2337-1-fullmanet@gmail.com> From: Max Reitz Message-ID: <77452a10-3aee-95f5-ec29-b338112c8156@redhat.com> Date: Wed, 10 Aug 2016 19:42:47 +0200 MIME-Version: 1.0 In-Reply-To: <20160810150344.2337-1-fullmanet@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bGrparFmHfH1gQtGc1US59SOVFSTfe3Sa" Subject: Re: [Qemu-devel] [PATCH] qemu-img: add seek option to dd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Reda Sallahi , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Fam Zheng , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bGrparFmHfH1gQtGc1US59SOVFSTfe3Sa From: Max Reitz To: Reda Sallahi , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Fam Zheng , Stefan Hajnoczi Message-ID: <77452a10-3aee-95f5-ec29-b338112c8156@redhat.com> Subject: Re: [PATCH] qemu-img: add seek option to dd References: <20160810150344.2337-1-fullmanet@gmail.com> In-Reply-To: <20160810150344.2337-1-fullmanet@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 10.08.2016 17:03, Reda Sallahi wrote: > This patch adds the seek option which allows qemu-img dd to skip a numb= er of > blocks on the output before copying the input. >=20 > A test case was added to test the seek option. >=20 > Signed-off-by: Reda Sallahi > --- > Depends on: > [PATCH v5] qemu-img: add skip option to dd >=20 > qemu-img-cmds.hx | 4 +- > qemu-img.c | 116 +++++++++++++++++++++++++++++++++++++= +------- > qemu-img.texi | 4 +- > tests/qemu-iotests/161 | 72 ++++++++++++++++++++++++++++ > tests/qemu-iotests/161.out | 51 ++++++++++++++++++++ > tests/qemu-iotests/group | 1 + > 6 files changed, 228 insertions(+), 20 deletions(-) > create mode 100755 tests/qemu-iotests/161 > create mode 100644 tests/qemu-iotests/161.out On IRC, Kevin has raised concern that qemu-img dd should never truncate the output image, or at least not until told to do so. While I do not share his opinion, I do share his concern that people may fall into this trap. Therefore, I propose doing two things: First, we should merge a patch which implements conv=3Dnotrunc. Without qemu-img dd actually truncating anything yet, that will be rather trivial. However, I think that until we have come to a conclusion on how to handle the case where conv=3Dnotrunc has not been passed, we should actually make conv=3Dnotrunc mandatory. That is, the patch implementing conv=3Dnotrunc should also make qemu-img dd error out if it has not been specified. I admit this is a rather stupid idea but I think it will do the trick for now. Second, this patch should be separated into two parts: The first of which make qemu-img dd no longer create the output image if it exists already, and the second of which then implements the seek option. Those are two different things so I think they should be done in two different patches. Max --bGrparFmHfH1gQtGc1US59SOVFSTfe3Sa 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 iQEvBAEBCAAZBQJXq2eXEhxtcmVpdHpAcmVkaGF0LmNvbQAKCRA7sUIC6DisrbvL CACqgenVjONTU0k+BkzQhn6zZ1RBwcq18cIizr/oWFQOol34M72k6g2kkDX+8JAS gQnpz0pC1hJXFPdpWH7rVf6BR5ZGPiH3MC5bAK0wjHNTE1AmyPf2ReqtfF2RPgeD fzeNQOs9N+s4D/Bc3ogzXhHlKbvFfg+75F1RzjFfvIrlB5QfFcIA4MTb1AT0MqZk Rg/L7ZlyJvds4I8YHfZcJY7vv+MxLSNpH+7ZUgWtrQiXbe2c3gTh9HFnG5Vyypnn E7j2A6mwoIJiB13V0ZYbcKFnokMy3+dPG6ZfTKh9qQHbsQXUBcLA0IKHNexLgD/E AddbBQmIt/xPhJJG3zww18vn =Etrw -----END PGP SIGNATURE----- --bGrparFmHfH1gQtGc1US59SOVFSTfe3Sa--