Bug 1098078

Summary: Support the count_bytes iflag in dd
Product: Red Hat Enterprise Linux 6 Reporter: Federico Simoncelli <fsimonce>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Tomas Dolezal <todoleza>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: amureini, iheim, pbrady, psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: coreutils-8.4-34.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 06:34:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1098080    

Description Federico Simoncelli 2014-05-15 09:12:13 UTC
Description of problem:
At the moment dd is not supporting the count_bytes iflag.

Version-Release number of selected component (if applicable):
coreutils-8.4-31.el6_5.1

How reproducible:
100%

Steps to Reproduce:
$ truncate -s 5120 test-in
$ dd if=test-in of=test-out bs=1024 count=5119 iflag=count_bytes
dd: invalid input flag: `count_bytes'

Actual results:
dd: invalid input flag: `count_bytes'

Expected results:
4+1 records in
4+1 records out
5119 bytes (5.1 kB) copied, 0.000199956 s, 25.6 MB/s


Additional info:
The count_bytes iflag is very useful for copying virtual disks images.

Comment 1 Pádraig Brady 2014-05-15 09:44:09 UTC
If we were to backport this the changes would be:
  http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff_plain;h=140eca15
  http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff_plain;h=4bb5dbcf

Note the same functionality can be simulated quite efficiently
using multiple dd runs with decreasing block size as demonstrated here:
  https://github.com/openstack/nova/commit/9d2ea970

Comment 8 errata-xmlrpc 2014-10-14 06:34:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1457.html