[Libtorrent-devel] full allocation
lucke at o2.pl
Sat May 5 13:43:02 UTC 2007
I've been fiddling a bit with rtorrent, trying to make full file allocation on
XFS work (it's a bugger when downloading several files makes "xfs_db -c frag"
show 99% fragmentation and slows down your FS cooonsiderably, while
allocating files takes just a few seconds on XFS). Alas, although I do have a
basic programming/C/C++ knowledge, I haven't really gotten into the arcana of
it. I've noticed that the support for allocation (posix_fallocate and XFS
specific) is already there (data/socket_file.cc). I've made rtorrent allocate
files nicely and start downloading nicely, but it complains about "bad
data/chunks" upon completion (at least on bigger files?). I think I should
fiddle with resize(), which shouldn't be needed anymore, and perhaps change
something in regards to hashing, but well, I'm quite lost here. Additionally,
checking whether my changes worked is quite problematic, as I have to
download something bigger to confirm that.
Any help would be appreciated. I just hate how proper allocation is
disregarded in the great majority of clients.
More information about the Libtorrent-devel