I think it would be nice if the rtorrent ebuild were to support the --with-posix-fallocate configure option. So, I'm attaching a patch which adds support based on a theoretical "fallocate" local USE flag. This patch also adds some einfo which I will quote here because it neatly summarises its purpose: "You have enabled support for posix_fallocate(3). This will allow rtorrent to allocate the necessary disk space for a torrent in advance of any data being written. The advantage is that the kernel has the ability to allocate all of the necessary space contiguously, thus avoiding the fragmentation that would otherwise occur as the download progresses. The disadvantage is that it will introduce a delay if your chosen filesystem does not natively support the fallocate syscall. Currently, the following filesystems are known to have full support: ext4, xfs and brtfs." Further information about posix_fallocate: http://www.opengroup.org/onlinepubs/009695399/functions/posix_fallocate.html http://lwn.net/Articles/226710/ http://wiki.archlinux.org/index.php/RTorrent
Created attachment 214605 [details, diff] Patch against 0.6.1 to add USE="fallocate" support
I was mistaken to think that it is rtorrent that accepts the configure option; it is actually libtorrent instead. It turns out that libtorrent-0.12.6.ebuild already passes --with-posix-fallocate. Closing as INVALID.