e2fsprogs/misc
Darrick J. Wong c7c539e8fd e4defrag: backwards-allocated files should be defragmented too
Currently, e4defrag avoids increasing file fragmentation by comparing
the number of runs of physical extents of both the original and the
donor files.  Unfortunately, there is a bug in the routine that counts
physical extents, since it doesn't look at the logical block offsets
of the extents.  Therefore, a file whose blocks were allocated in
reverse order will be seen as only having one big physical extent, and
therefore will not be defragmented.

Fix the counting routine to consider logical extent offset so that we
defragment backwards-allocated files.  This could be problematic if we
ever gain the ability to lay out logically sparse extents in a
physically contiguous manner, but presumably one wouldn't call defrag
on such a file.

Reported-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-22 12:40:56 -04:00
..
Makefile.in quota: integrate mkquota.h into quotaio.h 2014-05-13 10:13:04 -04:00
badblocks.8.in badblocks: update man page's description of the -v option 2011-09-15 19:33:34 -04:00
badblocks.c badblocks: print warning if set_o_direct() fails 2014-01-08 19:46:05 -05:00
base_device.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
base_device.tst ChangeLog, Makefile.in, base_device.c, base_device.tst, fsck.c, fsck.h: 2000-12-03 06:33:56 +00:00
blkid.8.in blkid: On the man page, show option arguments in the descriptions. 2008-08-14 13:29:50 -04:00
blkid.c blkid: suppress Coverity warning 2014-01-30 18:25:15 -05:00
chattr.1.in Fix nroff macro issue in chattr man page 2014-07-10 00:48:57 -04:00
chattr.c e2fsprogs: revise and extend chattr(1) and chattr usage() 2014-07-04 23:59:45 -04:00
dumpe2fs.8.in Add ext4 man page and update and clean up the other man pages 2013-12-24 22:50:23 -05:00
dumpe2fs.c e2fsprogs: introduce ext2fs_close_free() helper 2014-07-05 21:06:48 -04:00
e2freefrag.8.in e2freefrag: Update manpage to include e2fsprogs version and release date 2009-08-22 23:41:49 -04:00
e2freefrag.c e2fsprogs: introduce ext2fs_close_free() helper 2014-07-05 21:06:48 -04:00
e2freefrag.h e2freefrag: Improve output to include be more like xfs_db's freesp -s 2009-07-24 18:33:46 -04:00
e2image.8.in e2image: Clarify e2image's usage message 2013-12-27 01:14:09 -05:00
e2image.c e2fsprogs: introduce ext2fs_close_free() helper 2014-07-05 21:06:48 -04:00
e2initrd_helper.c Clean up sparse warnings 2013-12-16 18:56:36 -05:00
e2label.8.in Update man pages to include ext4 in the synposis, instead of just "ext2/ext3" 2009-05-30 12:34:28 -04:00
e2label.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
e2undo.8.in Add e2undo command 2008-04-27 19:42:05 -04:00
e2undo.c Clean up sparse warnings 2013-12-16 18:56:36 -05:00
e4defrag.8.in e4defrag: update man page about -c option 2010-12-13 09:59:07 -05:00
e4defrag.c e4defrag: backwards-allocated files should be defragmented too 2014-07-22 12:40:56 -04:00
ext4.5.in e2fsprogs: add mount options to ext4.5 2014-07-04 23:59:45 -04:00
filefrag.8.in filefrag: improvements to filefrag FIEMAP handling 2012-12-29 22:41:41 -05:00
filefrag.c filefrag: fix issues with 29758d2 2014-06-01 21:27:43 -04:00
findfs.8.in Update version string for WIP release. 2002-08-18 03:38:15 -04:00
findsuper.c build: use long long for __u64 by default 2013-12-15 22:10:09 -05:00
fsck.8.in Make fsck ignore mounted filesystems if given the -M option 2008-02-17 17:35:46 -05:00
fsck.c Clean up sparse warnings 2013-12-16 18:56:36 -05:00
fsck.h Fix miscellaneous gcc -Wall warnings 2008-03-17 23:17:13 -04:00
ismounted.c misc: cleanup unused variables on MacOS 2012-12-29 17:28:37 -05:00
jfs_user.h Move linux/jbd.h to ext2fs/kernel-jbd.h, to avoid using the 2001-12-23 19:33:51 -05:00
logsave.8.in * Add support for the -a and -s options to logsave. 2003-04-16 14:05:06 -04:00
logsave.c logsave: make message when process has a non-zero exit code to be less scary 2014-03-29 10:25:49 -04:00
lsattr.1.in chattr.1.in: Clarify man page. 2004-01-31 20:27:36 -05:00
lsattr.c Pass the gettext() function to libcom_err 2011-10-05 01:00:30 -04:00
mk_hugefiles.c mke2fs: fix fencepost error when calling strncat 2014-07-10 15:33:57 -04:00
mke2fs-hurd.conf Add "big" and "huge" types to mke2fs.conf 2011-10-03 23:46:17 -04:00
mke2fs.8.in mke2fs: allow metadata blocks to be at the beginning of the file system 2014-01-30 13:58:18 -05:00
mke2fs.c mke2fs: add support to align hugefiles relative to beginning of the disk 2014-07-09 10:42:13 -04:00
mke2fs.conf.5.in mke2fs: add support to align hugefiles relative to beginning of the disk 2014-07-09 10:42:13 -04:00
mke2fs.conf.in mke2fs.conf: allow use of a custom mke2fs.conf file 2012-03-26 21:36:20 -07:00
mke2fs.h mke2fs: add support to align hugefiles relative to beginning of the disk 2014-07-09 10:42:13 -04:00
mklost+found.8.in chattr.1.in: Clarify man page. 2004-01-31 20:27:36 -05:00
mklost+found.c build: quiet LLVM non-literal string format warning 2013-12-15 22:12:16 -05:00
nls-enable.h Fix more spelling errors found by translators and add pluralization 2011-10-09 17:54:23 -04:00
partinfo.c Pass the gettext() function to libcom_err 2011-10-05 01:00:30 -04:00
profile-to-c.awk Compile the default mke2fs.conf into mke2fs program 2007-07-04 14:27:30 -04:00
tune2fs.8.in tune2fs: allow removal of dirty journal with two "-f" options 2014-02-20 20:49:56 -05:00
tune2fs.c e2fsprogs: introduce ext2fs_close_free() helper 2014-07-05 21:06:48 -04:00
util.c e2fsprogs: introduce ext2fs_close_free() helper 2014-07-05 21:06:48 -04:00
util.h mke2fs: print a message when creating a regular file 2014-05-05 10:29:35 -04:00
uuidd.8.in Fix the pathname of /var/lib/uuidd/uuidd.pid in uuidd man page. 2008-01-19 18:13:14 -05:00
uuidd.c build: quiet LLVM non-literal string format warning 2013-12-15 22:12:16 -05:00
uuidd.rc Add uuidd daemon to prevent duplicate time-based UUID's 2007-12-16 17:28:46 -05:00
uuidgen.1.in Fix typo and clarify the uuidgen man page 2007-08-20 21:46:19 -04:00
uuidgen.c uuidgen: don't use set_com_err_gettext() 2011-10-05 15:03:59 -04:00