https://bugs.kde.org/show_bug.cgi?id=490231

Jack Hill <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/netw
                   |                            |ork/libktorrent/-/commit/e6
                   |                            |5dfd257707d20f411ce4e8566d0
                   |                            |5788840766c

--- Comment #2 from Jack Hill <[email protected]> ---
Git commit e65dfd257707d20f411ce4e8566d05788840766c by Jack Hill, on behalf of
Asish Kumar.
Committed on 20/11/2026 at 18:58.
Pushed by jackh into branch 'master'.

Remove XFS specific preallocation and try fallocate first

When full preallocation is enabled and libktorrent is built with XFS support,
`CacheFile::preallocate` used `XFS_IOC_RESVSP64`, which only reserves blocks
and does not change the file size. Since it reported success, the regular
truncate was skipped and files on XFS kept their old size (usually 0 bytes).

This MR removes the XFS special handling. FreeBSD removed support for XFS in
FreeBSD 10. Linux 2.6.23 added the `fallocate` function which is an optimized
implementation for posix_fallocate, and natively supports XFS. Hence the
XFS-specific code can be removed from libktorrent.

M  +0    -16   CMakeLists.txt
M  +0    -3    src/config-ktorrent.h.cmake
M  +1    -11   src/diskio/cachefile.cpp
M  +26   -57   src/util/fileops.cpp
M  +0    -13   src/util/fileops.h

https://invent.kde.org/network/libktorrent/-/commit/e65dfd257707d20f411ce4e8566d05788840766c

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to