Comment 16 for bug 321528

Revision history for this message
Theodore Ts'o (tytso) wrote : Re: ext4 defrag / defragment tool in Jaunty - include

As long as adventurous users realize that e4defrag might destroy their data, sure. There has been some discussion about initializing requiring e4defrag to check for the existence of an environment variable, "I_KNOW_E4DEFRAG_MAY_DESTORY_MY_DATA_AND_WILL_DO_BACKUPS_FIRST" before it will run.

One of the big differences between filesystem utilities and other programs is that failures with say, a cr*p proprietary video driver that causes a system crash whenever you exit a game is after you reboot, little harm is done. But if e4defrag ends up destroying data, users tend to get awfully cranky.

Eric Sandeen from Red Hat has contributed code to a test suite to provide very basic defragmentation testing, but making sure e4defrag does the right thing under all circumstances (i.e., sparse files, files with preallocation space, files which I/O is taking place at the same time as the defragmentation, etc.) still needs to be added.

As far as tools to visualize the level of fragmentation, Andreas Dilger from Sun Microsystems has already donated a tool to help visualize the level of free-space fragmentation, e2freefrag, which is already in the git mainline sources.