unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38186: dd doesn't copy whole file when specifying units with bs
@ 2019-11-12 20:47 Jack Hill
  2019-11-12 21:45 ` Clément Lassieur
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Hill @ 2019-11-12 20:47 UTC (permalink / raw)
  To: 38186

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#38186: dd doesn't copy whole file when specifying units with bs
  2019-11-12 20:47 bug#38186: dd doesn't copy whole file when specifying units with bs Jack Hill
@ 2019-11-12 21:45 ` Clément Lassieur
  2019-11-13 16:17   ` Jack Hill
  0 siblings, 1 reply; 4+ messages in thread
From: Clément Lassieur @ 2019-11-12 21:45 UTC (permalink / raw)
  To: Jack Hill; +Cc: 38186

Hi Jack,

> 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).

Does this[1] help?

[1]: https://superuser.com/questions/730801/dd-immidiately-completes-but-actually-needs-sync

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#38186: dd doesn't copy whole file when specifying units with bs
  2019-11-12 21:45 ` Clément Lassieur
@ 2019-11-13 16:17   ` Jack Hill
  2019-11-13 17:00     ` Clément Lassieur
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Hill @ 2019-11-13 16:17 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: 38186-done

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

On Tue, 12 Nov 2019, Clément Lassieur wrote:

> Does this[1] help?
>
> [1]: https://superuser.com/questions/730801/dd-immidiately-completes-but-actually-needs-sync

Indeed it does. I guess I just got lucky with the second invocation that 
data got written out. Thanks very much for the pointer, and sorry for the 
extra noise.

Since I no longer believe this to be a bug, I'm closing it.

Best,
Jack

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#38186: dd doesn't copy whole file when specifying units with bs
  2019-11-13 16:17   ` Jack Hill
@ 2019-11-13 17:00     ` Clément Lassieur
  0 siblings, 0 replies; 4+ messages in thread
From: Clément Lassieur @ 2019-11-13 17:00 UTC (permalink / raw)
  To: Jack Hill; +Cc: 38186-done

Jack Hill <jackhill@jackhill.us> writes:

> On Tue, 12 Nov 2019, Clément Lassieur wrote:
>
>> Does this[1] help?
>>
>> [1]: https://superuser.com/questions/730801/dd-immidiately-completes-but-actually-needs-sync
>
> Indeed it does. I guess I just got lucky with the second invocation that data
> got written out. Thanks very much for the pointer, and sorry for the extra
> noise.
>
> Since I no longer believe this to be a bug, I'm closing it.

You're welcome :)
Clément

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-13 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 20:47 bug#38186: dd doesn't copy whole file when specifying units with bs Jack Hill
2019-11-12 21:45 ` Clément Lassieur
2019-11-13 16:17   ` Jack Hill
2019-11-13 17:00     ` Clément Lassieur

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).