lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 03 Jun 2013 09:12:09 -0700
From:	"Joseph D. Wagner" <>
To:	<>
Subject: RFC: [Bug 968876] e4defrag incorrectly calculates optimum extents

The "Total/best extents" calculation for done in the e4defrag program 
doesn't seems to not consider the limit of 32768 file system blocks (see 
/usr/src/linux/fs/ext4/ext4_extents.h comment EXT_INIT_MAX_LEN) in an 
extent when computing the "best" value. It seems to presume 2G is the 
best extent size, but on a file system with a 4kb block size the largest 
available extent is 128M not 2G.

(The best extent size calculation in e4defrag seems to be based on 
block group size but the underlying implementation in the kernel is 
limited to a __le16 blocks and uses up one whole bit of that to flag 
whether the extent is initialized, which actually produces a one-block 
perturbation in the actual limit based on how the extent was allocated 
(e.g. whether falloc used FS_KEEP_SIZE or not), go go gadget perturbed 
math. 8-)).

-rw-r--r-- 1 rwhite rwhite 5.0G Jun 13 16:28 CentOS.qcow2

yeilds output: (where "/3" is wrong).

Total/best extents 152/3

Proposed patch available here:

Joseph D. Wagner
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists