Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33893C433E0 for ; Thu, 4 Feb 2021 20:11:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 118F464DFD for ; Thu, 4 Feb 2021 20:11:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 118F464DFD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kamp.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7kyM-0007TZ-RR for qemu-devel@archiver.kernel.org; Thu, 04 Feb 2021 15:11:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7kx3-0006pG-Oi for qemu-devel@nongnu.org; Thu, 04 Feb 2021 15:10:05 -0500 Received: from kerio.kamp.de ([195.62.97.192]:59029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7kx1-0002IR-KZ for qemu-devel@nongnu.org; Thu, 04 Feb 2021 15:10:05 -0500 X-Footer: a2FtcC5kZQ== Received: from submission.kamp.de ([195.62.97.28]) by kerio.kamp.de with ESMTPS (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)) for qemu-devel@nongnu.org; Thu, 4 Feb 2021 21:09:48 +0100 Received: (qmail 6251 invoked from network); 4 Feb 2021 20:09:53 -0000 Received: from ac71.vpn.kamp-intra.net (HELO ?172.20.250.71?) (pl@kamp.de@::ffff:172.20.250.71) by submission.kamp.de with ESMTPS (DHE-RSA-AES128-SHA encrypted) ESMTPA; 4 Feb 2021 20:09:53 -0000 Subject: Re: [PATCH] qemu-img: add seek and -n option to dd command To: Eric Blake , qemu-block@nongnu.org References: <20210128140704.6547-1-pl@kamp.de> <99982043-ed89-5fbe-afe2-691a9c19280d@redhat.com> From: Peter Lieven Message-ID: <567ab8bb-b452-d6c2-dec7-bc2cf1e34ec8@kamp.de> Date: Thu, 4 Feb 2021 21:09:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <99982043-ed89-5fbe-afe2-691a9c19280d@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Received-SPF: pass client-ip=195.62.97.192; envelope-from=pl@kamp.de; helo=kerio.kamp.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.182, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Am 02.02.21 um 16:51 schrieb Eric Blake: > On 1/28/21 8:07 AM, Peter Lieven wrote: >> Signed-off-by: Peter Lieven > Your commit message says 'what', but not 'why'. Generally, the one-line > 'what' works well as the subject line, but you want the commit body to > give an argument why your patch should be applied, rather than blank. > > Here's the last time we tried to improve qemu-img dd: > https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg02618.html I was not aware of that story. My use case is that I want to be able to "patch" an image that Qemu is able to handle by overwriting certain sectors. And I especially do not want to "mount" that image via qemu-nbd because I might not trust it. I totally want to avoid that the host system tries to analyse that image in terms of scanning the bootsector, partprobe, lvm etc. pp. > > where I also proposed adding seek=, and fixing skip= with count=. Your > patch does not do the latter. But the bigger complaint back then was > that 'qemu-img copy' should be able to do everything, and that qemu-img > dd should then just be a thin shim around 'qemu-img copy', rather than > having two parallel projects that diverge in their implementations. understood. I was not aware of an issue with skip and count. The patch works for me and I wanted to share it. But when I read the thread it seems that it would be a difficult task to get it merged. > > Your patch does not have the typical '---' divider and diffstat between > the commit message and the patch proper; this may be a factor of which > git packages you have installed, but having the diffstat present makes > it easier to see at a glance what your patch touches without reading the > entire email. I had to go hunting to learn if you added iotest coverage > of this new feature... > > ...and the answer was no, you didn't. You'll need to add that in v2 > (see the link to my earlier attempt at modifying dd for an example). I did not. Maybe I accidently killed the '---' divider. If I will make a V2 I will add an I/O test. Thanks for your suggestions, Peter