fallocate is a system call introduced in Linux >= 2.6.23, allowing preallocation of disk space without manually zeroing a file. XFS and ext4 currently implement this call (as of 2.6.25). libtorrent, in particular, is pretty bad about file fragmentation; a recent 3GB ISO downloaded through rtorrent was spread across 37523 fragments. Ouch. libtorrent 0.12.2 (and possibly earlier versions) have the --with-posix-fallocate configure switch which enables use of the new call when available. This should theoretically eliminate most fragmentation with libtorrent-based apps. Please consider adding --with-posix-fallocate to the ebuild for libtorrent. Thanks in advance.
But on filesystems that only nominally support this call, it works by touching every page of every file. Upstream does not recommend this for normal use and I tend to agree. "There's no generic non-blocking way of allocating this space, and posix_fallocate seems to be implemented such that it just touches each page." If it works on your system, I think this is a suitable place for EXTRA_ECONF to be used. Untill such a time as it can be guaranteed that posix_fallocate won't block access to the hard drive for a considerable time when starting a torrent on old filesystems, I'll consider the feature non-finished. Write a patch (or make upstream write a patch) that makes posix_fallocate only be used on filesystems that support it well natively or wait for old systems to be discontinued.