Hi Andreas, Thanks for the comments. 2010/08/25 21:00, andreas@xxxxxxxxxx wrote: > Is there a reason why the offset of the original file and the donor file > must be the same? e4defrag creates a donor file whose size is the same of the original file by fallocate. There is a possibility that the original file will be corrupted after moving an extent if the offset of the original file and the donor file are different. So they are checked in the kernel space, but it may be unnecessary from the point of view of the ioctl. > As i can see the patch for relevant file defragmentation in e4defrag > supports only directories. May it be possible to select any desired file? That's interesting. I came up with the new interface of e4defrag -r. What do you think the following implementation idea? Usage: e4defrag -r directory...| device... e4defrag -r base_file move_file... <--- new 1. Defrag base_file to reduce fragmentation of extents (call EXT4_IOC_MOVE_EXT) 2. Preallocate physical blocks near the data blocks of base_file 3. Move move_file's extents to the blocks that are allocated by (2). 4. Repeat (2) and (3) for all files specified as move_file Regards, Kazuya Mio -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html