From unknown Tue Jun 17 01:25:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6004 <6004@debbugs.gnu.org> To: bug#6004 <6004@debbugs.gnu.org> Subject: Status: [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices Reply-To: bug#6004 <6004@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:25:31 +0000 retitle 6004 [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices reassign 6004 coreutils submitter 6004 Eric Blake severity 6004 normal tag 6004 notabug patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 22 10:39:48 2010 Received: (at submit) by debbugs.gnu.org; 22 Apr 2010 14:39:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4xZE-0007ap-AZ for submit@debbugs.gnu.org; Thu, 22 Apr 2010 10:39:48 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4xZC-0007ak-JL for submit@debbugs.gnu.org; Thu, 22 Apr 2010 10:39:47 -0400 Received: from lists.gnu.org ([199.232.76.165]:47588) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O4xZ7-0007CV-Rg for submit@debbugs.gnu.org; Thu, 22 Apr 2010 10:39:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4xZ7-0002z3-9H for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:39:41 -0400 Received: from [140.186.70.92] (port=35167 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4xZ5-0002yE-MM for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:39:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4xZ3-0008WL-EC for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:39:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12559) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4xZ3-0008Vh-6G for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:39:37 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3MEdZCE013909 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 22 Apr 2010 10:39:35 -0400 Received: from [10.3.252.186] (vpn-252-186.phx2.redhat.com [10.3.252.186]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3MEdTUK011110; Thu, 22 Apr 2010 10:39:30 -0400 Message-ID: <4BD05F9E.3000002@redhat.com> Date: Thu, 22 Apr 2010 08:39:26 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: "Daniel P. Berrange" Subject: Re: [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices References: <1271868973-2227-1-git-send-email-berrange@redhat.com> <1271868973-2227-4-git-send-email-berrange@redhat.com> <4BCF682F.3080109@redhat.com> <20100422103717.GI31776@redhat.com> In-Reply-To: <20100422103717.GI31776@redhat.com> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig164861C14F3027A40C8E636A" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: submit Cc: libvir-list@redhat.com, bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.9 (-------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig164861C14F3027A40C8E636A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable [adding bug-coreutils] On 04/22/2010 04:37 AM, Daniel P. Berrange wrote: >>> - if (virAsprintf(&dest, "exec:%s >>%s 2>/dev/null", argstr, safe_= target) < 0) { >>> + if (virAsprintf(&dest, "exec:%s | dd of=3D%s seek=3D%llub", >>> + argstr, safe_target, offset) < 0) { >> >> Don't you still need to silence stderr, particularly since dd writes t= o >> stderr even on success? (2 instances) >=20 > I didn't want to silence stderr, because I want it to end up in the QEM= U > logfile if anything goes wrong. So i really need a way to make dd keep= > quiet on success, rather than throwing away stderr Coreutils comes with an extension 'dd status=3Dnoxfer' which silences som= e (but not all) output to stderr, but you'd have to test whether you are targetting coreutils' dd (if dd comes from somewhere else, like busybox, you'll cause a syntax error that prevents dd from doing anything at all).= There was a patch submitted to coreutils [1] that would add status=3Dnoinfo, but it is currently held up by copyright status and lack= of documentation. Maybe I should revive that patch (or rather, write it from scratch, to avoid copyright taint). But even so, you are still up against the issue of testing whether you are targetting new-enough dd. [1] http://lists.gnu.org/archive/html/bug-coreutils/2010-02/msg00161.html= About the best you can portably do, then, is capture stderr, then check the exit status of dd; if the exit status is 0, discard the captured stderr; otherwise, pass the stderr on to the logfile: foo | dd of=3Da seek=3D$n 2>b; st=3D$?; if test $st !=3D 0; then cat b >&= 2; \ fi && rm -f b && exit $st --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig164861C14F3027A40C8E636A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL0F+kAAoJEKeha0olJ0NqT3AH/31HCpwURROMAHTvM4ArmE6b sakML5JbPyGZ3wqWwPm5FFQunDt1RczDimzwK1BLEJGHpwWAGwBIkNSYOALrVLi3 CccF6FlDOclzOn722xeMc3Zo9xN+PjNVEktFrLWEnP/492UrNte3xPTDcBoq2yHG R3+8ZtWj6Vs6rjVaB3VzqDUwu9MImlOa1D2cMrvrdGx+BvzI6XoUvf8a4mDXs/lI wa65b7GUFUOfNroTM66rap4qsasPqHzwM1VuorpLJDq1yQ1iKpj1OzWTPhxash88 S7icqaW2po9Ik0fHJsH1zCWrz92dYK7niU1FjGKfjOgoxd/qCCk/t6B4cGCxZ1Y= =R8lC -----END PGP SIGNATURE----- --------------enig164861C14F3027A40C8E636A-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 22 11:57:54 2010 Received: (at submit) by debbugs.gnu.org; 22 Apr 2010 15:57:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4ymn-00087L-51 for submit@debbugs.gnu.org; Thu, 22 Apr 2010 11:57:54 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4xmy-0007gc-Om for submit@debbugs.gnu.org; Thu, 22 Apr 2010 10:54:02 -0400 Received: from lists.gnu.org ([199.232.76.165]:55577) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O4xmu-00082H-2p for submit@debbugs.gnu.org; Thu, 22 Apr 2010 10:53:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4xmt-0003cR-PS for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:53:55 -0400 Received: from [140.186.70.92] (port=38217 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4xmn-0003ay-BO for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:53:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4xmk-0002iK-KI for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:53:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11451) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4xmk-0002i2-8D for bug-coreutils@gnu.org; Thu, 22 Apr 2010 10:53:46 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3MEriOU027170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 22 Apr 2010 10:53:44 -0400 Received: from file.fab.redhat.com (file.fab.redhat.com [10.33.63.6]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3MErbaA013605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Apr 2010 10:53:38 -0400 Received: from file.fab.redhat.com (localhost.localdomain [127.0.0.1]) by file.fab.redhat.com (8.13.1/8.13.1) with ESMTP id o3MErbSl026654; Thu, 22 Apr 2010 15:53:37 +0100 Received: (from berrange@localhost) by file.fab.redhat.com (8.13.1/8.13.1/Submit) id o3MErbjV026650; Thu, 22 Apr 2010 15:53:37 +0100 Date: Thu, 22 Apr 2010 15:53:37 +0100 From: "Daniel P. Berrange" To: Eric Blake Subject: Re: [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices Message-ID: <20100422145337.GM17980@redhat.com> References: <1271868973-2227-1-git-send-email-berrange@redhat.com> <1271868973-2227-4-git-send-email-berrange@redhat.com> <4BCF682F.3080109@redhat.com> <20100422103717.GI31776@redhat.com> <4BD05F9E.3000002@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BD05F9E.3000002@redhat.com> User-Agent: Mutt/1.4.1i X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 22 Apr 2010 11:57:51 -0400 Cc: libvir-list@redhat.com, bug-coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) On Thu, Apr 22, 2010 at 08:39:26AM -0600, Eric Blake wrote: > [adding bug-coreutils] > > On 04/22/2010 04:37 AM, Daniel P. Berrange wrote: > >>> - if (virAsprintf(&dest, "exec:%s >>%s 2>/dev/null", argstr, safe_target) < 0) { > >>> + if (virAsprintf(&dest, "exec:%s | dd of=%s seek=%llub", > >>> + argstr, safe_target, offset) < 0) { > >> > >> Don't you still need to silence stderr, particularly since dd writes to > >> stderr even on success? (2 instances) > > > > I didn't want to silence stderr, because I want it to end up in the QEMU > > logfile if anything goes wrong. So i really need a way to make dd keep > > quiet on success, rather than throwing away stderr > > Coreutils comes with an extension 'dd status=noxfer' which silences some > (but not all) output to stderr, but you'd have to test whether you are > targetting coreutils' dd (if dd comes from somewhere else, like busybox, > you'll cause a syntax error that prevents dd from doing anything at all). Yep, just looked at status=noxfer, but there's not much point in it since it still prints other stats unconditionally. > > There was a patch submitted to coreutils [1] that would add > status=noinfo, but it is currently held up by copyright status and lack > of documentation. Maybe I should revive that patch (or rather, write it > from scratch, to avoid copyright taint). But even so, you are still up > against the issue of testing whether you are targetting new-enough dd. > > [1] http://lists.gnu.org/archive/html/bug-coreutils/2010-02/msg00161.html > > About the best you can portably do, then, is capture stderr, then check > the exit status of dd; if the exit status is 0, discard the captured > stderr; otherwise, pass the stderr on to the logfile: > > foo | dd of=a seek=$n 2>b; st=$?; if test $st != 0; then cat b >&2; \ > fi && rm -f b && exit $st It really isn't worth the bother. A couple of lines of dd output in the logfile is no harm to anything. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 23 23:05:35 2013 Received: (at submit) by debbugs.gnu.org; 24 Mar 2013 03:05:35 +0000 Received: from localhost ([127.0.0.1]:42715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UJbFW-0006Ci-OQ for submit@debbugs.gnu.org; Sat, 23 Mar 2013 23:05:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45600) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UJbFU-0006Cc-WF for submit@debbugs.gnu.org; Sat, 23 Mar 2013 23:05:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJbDS-00084o-Ff for submit@debbugs.gnu.org; Sat, 23 Mar 2013 23:03:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-106.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJbDS-00084k-Bo for submit@debbugs.gnu.org; Sat, 23 Mar 2013 23:03:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJbDQ-0002x6-Tb for bug-coreutils@gnu.org; Sat, 23 Mar 2013 23:03:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJbDP-00083v-0N for bug-coreutils@gnu.org; Sat, 23 Mar 2013 23:03:24 -0400 Received: from mx.meyering.net ([88.168.87.75]:50371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJbDO-00083o-PB for bug-coreutils@gnu.org; Sat, 23 Mar 2013 23:03:22 -0400 Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2F00B642A3; Sun, 24 Mar 2013 04:03:22 +0100 (CET) From: Jim Meyering To: Eric Blake Subject: Re: [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices In-Reply-To: <4BD05F9E.3000002@redhat.com> (Eric Blake's message of "Thu, 22 Apr 2010 08:39:26 -0600") References: <1271868973-2227-1-git-send-email-berrange@redhat.com> <1271868973-2227-4-git-send-email-berrange@redhat.com> <4BCF682F.3080109@redhat.com> <20100422103717.GI31776@redhat.com> <4BD05F9E.3000002@redhat.com> Date: Sun, 24 Mar 2013 04:03:22 +0100 Message-ID: <87txo1o5xh.fsf@rho.meyering.net> Lines: 39 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: libvir-list@redhat.com, bug-coreutils , "Daniel P. Berrange" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) tags 6004 + notabug close 6004 thanks Eric Blake wrote: > [adding bug-coreutils] > > On 04/22/2010 04:37 AM, Daniel P. Berrange wrote: >>>> - if (virAsprintf(&dest, "exec:%s >>%s 2>/dev/null", argstr, >>>> safe_target) < 0) { >>>> + if (virAsprintf(&dest, "exec:%s | dd of=%s seek=%llub", >>>> + argstr, safe_target, offset) < 0) { >>> >>> Don't you still need to silence stderr, particularly since dd writes to >>> stderr even on success? (2 instances) >> >> I didn't want to silence stderr, because I want it to end up in the QEMU >> logfile if anything goes wrong. So i really need a way to make dd keep >> quiet on success, rather than throwing away stderr > > Coreutils comes with an extension 'dd status=noxfer' which silences some > (but not all) output to stderr, but you'd have to test whether you are > targetting coreutils' dd (if dd comes from somewhere else, like busybox, > you'll cause a syntax error that prevents dd from doing anything at all). > > There was a patch submitted to coreutils [1] that would add > status=noinfo, but it is currently held up by copyright status and lack > of documentation. Maybe I should revive that patch (or rather, write it > from scratch, to avoid copyright taint). But even so, you are still up > against the issue of testing whether you are targetting new-enough dd. > > [1] http://lists.gnu.org/archive/html/bug-coreutils/2010-02/msg00161.html ... As of coreutils-8.20, dd now accepts 'status=none' to suppress all informational output. so I've closed this. From unknown Tue Jun 17 01:25:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 21 Apr 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator