Dear all, I''m reading btrfs_defrag_file to find what would "btrfs fi defrag" do on one file. In btrfs_defrag_file, I image one case: One file A, which has lots of small fragmentation, e.g < 8K (em covers <8K mapping), and each fragmentation is far from the other fragmentation by PAGE_CACHE_SIZE at least on the disk. By walking the code, my conclusion is that "btrfs fi defrag" won''t gather the small fragments together to room out big continus disk space in this case. I wonder can we make btrfs_defrag_file more aggessive, e.g modify “next = defrag_lookup_extent(inode, em->start + em->len);” to “next = defrag_lookup_extent(inode, em->start + 64 * 1024);” in defrag_check_next_extent, or add some param to tune the behavior? Please advise. Thanks, Wang Sheng-Hui -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html