If conflicting options are passed, the last one takes precedence.
*defragment* [options] <file>|<dir> [<file>|<dir>...]::
-Defragment file data on a mounted filesystem.
+Defragment file data on a mounted filesystem. Requires kernel 2.6.33 and newer.
+
If '-r' is passed, files in dir will be defragmented recursively.
The start position and the number of bytes to defragment can be specified by
/*
* Kernel has a different default (256K) that is supposed to be safe,
* but it does not defragment very well. The 32M will likely lead to
- * better results and is independent of the kernel default.
+ * better results and is independent of the kernel default. We have to
+ * use the v2 defrag ioctl.
*/
thresh = 32 * 1024 * 1024;
+ defrag_global_fancy_ioctl = 1;
defrag_global_errors = 0;
defrag_global_verbose = 0;
defrag_global_errors = 0;
- defrag_global_fancy_ioctl = 0;
while(1) {
int c = getopt(argc, argv, "vrc::fs:l:t:");
if (c < 0)