Bug 453369

Summary: dd is doing math like a drive manufacturer
Product: [Fedora] Fedora Reporter: Norm Murray <nmurray>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-30 07:51:22 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:

Description Norm Murray 2008-06-30 06:52:17 UTC
# dd if=/dev/zero of=guest bs=1G count=14
14+0 records in
14+0 records out
15032385536 bytes (15 GB) copied, 658.655 s, 22.8 MB/s

14 * 1024 * 1024 * 1024 = 15032385536 

So the correct number of bytes are getting written. 15GB in the initial
statement from dd is wrong.

Comment 1 Ondrej Vasik 2008-06-30 07:51:22 UTC
Thanks for report, but it's not a bug. As you could check on
http://physics.nist.gov/cuu/Units/binary.html for quiet a long time exists
unification of binary units. Command dd should show 14G (or better 14GiB) or
15GB in this case, but it doesn't matter which one will be shown. It is
described in info pages(dd, Note: Block size::) and help page of dd command.

Citation from dd's help page:
"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."

Closing NOTABUG.