Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 298950 - Proposal to add posix_fallocate support to rtorrent
Summary: Proposal to add posix_fallocate support to rtorrent
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: http://www.opengroup.org/onlinepubs/0...
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2009-12-30 10:31 UTC by kfm
Modified: 2009-12-31 05:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against 0.6.1 to add USE="fallocate" support (rtorrent-0.6.1-r1-diff.patch,1.78 KB, patch)
2009-12-30 10:32 UTC, kfm
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2009-12-30 10:31:39 UTC
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
Comment 1 kfm 2009-12-30 10:32:26 UTC
Created attachment 214605 [details, diff]
Patch against 0.6.1 to add USE="fallocate" support
Comment 2 kfm 2009-12-31 05:01:00 UTC
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.