Bug 472376
Summary: | dd tool, human readable fix | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrey Arapov <andrey.arapov> | ||||||||
Component: | coreutils | Assignee: | Ondrej Vasik <ovasik> | ||||||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | low | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | rawhide | CC: | anton, kdudka, ovasik, twaugh | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | 6.12 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2008-11-20 15:51:21 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Created attachment 324185 [details]
proposed patch
Thanks for report and patch, however that's NOTABUG ... Please read again what's written in dd --help: "BLOCKS and BYTES may be followed by the following multiplicative suffixes: xM M, c 1, w 2, b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y." So generally - you have specified blocksize 1024*1024 - and output is shown in MB (1000*1000) form (and obviously rounded). Additionally there is no "| human_base_1024" in dd.c 's human_opts, so I wonder what was the original version of sources you have. Created attachment 324202 [details]
reworked patch
Please, read again comment #2 before making another patch... that behaviour is expected, correct and there is nothing to be patched... MB is 1000*1000 , M is 1024*1024 ... you requested size 1024*1024*6 , which is obviously displayed as 6.3*1000*1000 ... If you want your 6.0MB copied, try to use 6 * 1MB block and not 6* 1M block... fedora ~ # dd if=/dev/zero of=/tmp/tmpdata bs=1MB count=6 Note: 1MB = 1 Megabyte = 10^6 bytes 1MiB = 1 Mebibyte = 2^20 bytes Official reference: http://physics.nist.gov/cuu/Units/binary.html |
Created attachment 324184 [details] proposed patch dd tool is showing wrong information about the size of the copied data Example: fedora ~ # dd if=/dev/zero of=/tmp/tmpdata bs=1M count=6 6+0 records in 6+0 records out 6291456 bytes (6.3 MB) copied, 0.0142112 s, 443 MB/s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-!!! It must be 6.0 MB copied fedora ~ # echo "6291456/1024/1024"|bc -l 6.00000000000000000000