Bug 453369 - dd is doing math like a drive manufacturer
Summary: dd is doing math like a drive manufacturer
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-30 06:52 UTC by Norm Murray
Modified: 2008-06-30 07:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-30 07:51:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.