From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jack Hill Subject: bug#38186: dd doesn't copy whole file when specifying units with bs Date: Tue, 12 Nov 2019 15:47:19 -0500 (EST) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57338) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUd51-00055A-7n for bug-guix@gnu.org; Tue, 12 Nov 2019 15:48:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUd50-0003ci-0w for bug-guix@gnu.org; Tue, 12 Nov 2019 15:48:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49639) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUd4z-0003cc-UH for bug-guix@gnu.org; Tue, 12 Nov 2019 15:48:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iUd4z-0001lS-Qw for bug-guix@gnu.org; Tue, 12 Nov 2019 15:48:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:57278) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUd4L-0004yd-N4 for bug-guix@gnu.org; Tue, 12 Nov 2019 15:47:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUd4K-0003NH-IL for bug-guix@gnu.org; Tue, 12 Nov 2019 15:47:21 -0500 Received: from minsky.hcoop.net ([104.248.1.95]:55458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iUd4K-0003N9-FH for bug-guix@gnu.org; Tue, 12 Nov 2019 15:47:20 -0500 Received: from marsh.hcoop.net ([45.55.52.66]) by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iUd4J-00014b-Uo for bug-guix@gnu.org; Tue, 12 Nov 2019 15:47:19 -0500 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 38186@debbugs.gnu.org Hi Guix, It seems that my version of dd from coreutils-8.31 does not seem to work correctly when using units with the bs option (e.g. bs=1M). In the terminal session below, I first use bs=1M. The output looks okay: dd appears to have copied the whole 2.3GiB file, but it has done so impossibly quickly. It turns out that went so quickly because the whole file has not been copied. If instead of using the units modifier, I specify the same number of bytes directly, everything seems to work as expected (notice the slower speed). I have not determined whether this problem is specific to Guix. ``` $ sudo dd if=image.iso of=/dev/sda bs=1M 2349+1 records in 2349+1 records out 2463842304 bytes (2.5 GB, 2.3 GiB) copied, 1.0693 s, 2.3 GB/s $ sudo dd if=image.iso of=/dev/sda bs=1048576 2349+1 records in 2349+1 records out 2463842304 bytes (2.5 GB, 2.3 GiB) copied, 3.03265 s, 812 MB/s $ ls -l /run/current-system/profile/bin/dd lrwxrwxrwx 18 root root 65 Dec 31 1969 /run/current-system/profile/bin/dd -> /gnu/store/9kzrrccpzl6i1sfwb0drb00gi2gwk0x0-coreutils-8.31/bin/dd $ guix describe Generation 42 Oct 28 2019 11:51:58 (current) guix 8c8d607 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 8c8d60752e1ad73d5bd87d8497b357f8a8a389ab ``` Best, Jack