Bug 849972

Summary: busybox 'du' reporting different sizes with -h and -m parameters
Product: Red Hat Enterprise Linux 6 Reporter: Tomas Dolezal <todoleza>
Component: busyboxAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3Keywords: FutureFeature
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-15 19:26:51 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: 1270638    

Description Tomas Dolezal 2012-08-21 11:39:57 UTC
Description of problem:
busybox 'du' applet reports different sizes with -h and -m parameters comparing to coreutils 'du' on small files

Version-Release number of selected component (if applicable):
busybox-1.15.1-15.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. `dd if=/dev/zero of=/tmp/testfile.tmp bs=1128k count=1`
2. check `du -h /tmp/testfile.tmp` and analogically with busybox
3. compare results
  
Actual results:
 comparation of last line with -h parameter
	busybox			|	coreutils
>1.1M	/tmp/testfile.tmp	| 1.2M	/tmp/testfile.tmp

 comparation of last line with -m parameter
	busybox			|	coreutils
>1	/tmp/testfile.tmp	| 2	/tmp/testfile.tmp

Expected results:
busybox 'du' reports same sizes when approximating as coreutils 'du' does

Comment 2 Denys Vlasenko 2012-12-14 16:21:48 UTC
Coreutils rounds sizes up, busybox rounds to nearest.

Not sure whether this needs to be fixed...

For now I added a comment in the upstream busybox source explaining this.

Comment 3 Denys Vlasenko 2015-10-15 19:26:51 UTC
Closing as WONTFIX. This doesn't look important.