Registered Member
|
I've been missing this feature from Azureus, so I thought that I'll implement it as is a fairly simple thing : patch.
Now 5G file is allocated in less than 1s instead of 20s, and 1024 * 3M are allocated in 10s vs. 1m05s. It depends on xfsprogs(ktorrent will compile without it too, but won't use XFS methods; didn't test that ). It should be possible to implement similar feature for Reiser4 and Ext4, but since both of those FS-es are experimental and undocumented it has to wait. I hope that I didn't break many things and someone else will find this patch useful too. |
Moderator
|
Nice, I need to make sure it doesn't conflict with our full disk preallocate we added last month. Does this xfs preallocate avoids fragmentation ? |
Registered Member
|
Thank you.
I've based my 'XfsPreallocate' on your 'FatPreallocate', so I hope it won't.
Yes, it's more modern way of preallocation, but filesystem has to support it, and every FS has its own way of using it. [1], [2], [3] (allocate-on-flash and extents), [4]. Raiser4 has its own undocumented, strange calls in libreiser4 and ext4 has 'EXT4_IOC_PREALLOCATE' ioctl, but I wasn't able to use it. I've also found on LKML patches adding this functionality to ext3, and messages suggesting using delalloc as posix_fallocate(); |
Registered Member
|
BTW:
While I was 'playing' with this, I've found that the labels showing free space in 'Open' file selector won't show correct values if 'Download to'/m_downloadLocation points to the location on other drive. Maybe this is intended, but personally I think that this is bit illogical, so I came with this. |
Moderator
|
|
Registered Member
|
|
Moderator
|
|
Registered Member
|
|
Registered Member
|
|
Moderator
|
Adding this fix breaks my compilation :
cd '/home/joris/ktorrent/newstuff/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make compiling /home/joris/ktorrent/newstuff/libktorrent/util/fileops.cpp (/home/joris/ktorrent/newstuff/libktorrent/util/fileops.cpp) compiling fileops.TUlo (g++) /usr/include/xfs/platform_defs.h:41: error: conflicting declaration ‘typedef long long unsigned int __u64’ /home/joris/ktorrent/newstuff/libktorrent/util/fileops.cpp:46: error: ‘__u64’ has a previous declaration as ‘typedef uint64_t __u64’ /usr/include/xfs/platform_defs.h:42: error: conflicting declaration ‘typedef long long int __s64’ /home/joris/ktorrent/newstuff/libktorrent/util/fileops.cpp:47: error: ‘__s64’ has a previous declaration as ‘typedef int64_t __s64’ *** Exited with status: 2 *** |
Registered Member
|
I've found something like this:
guarding missing types; and this file is from:
This #if has changed between .20 and .21 (or guys from gentoo broke something ) How about this: patch v2? |
Moderator
|
Registered users: Bing [Bot], Google [Bot]