diff --git a/libtransmission/CMakeLists.txt b/libtransmission/CMakeLists.txt index a1c4ff3e3..3279eed92 100644 --- a/libtransmission/CMakeLists.txt +++ b/libtransmission/CMakeLists.txt @@ -234,10 +234,6 @@ target_compile_definitions(${TR_NAME} $<$:WITH_WOLFSSL> $<$:ENABLE_GETTEXT>) -tr_target_compile_definitions_for_headers(${TR_NAME} - PRIVATE - xfs/xfs.h) - tr_target_compile_definitions_for_functions(${TR_NAME} PRIVATE copyfile diff --git a/libtransmission/file-posix.cc b/libtransmission/file-posix.cc index d2049c20b..661554f04 100644 --- a/libtransmission/file-posix.cc +++ b/libtransmission/file-posix.cc @@ -27,10 +27,6 @@ #include /* flock() */ #endif -#ifdef HAVE_XFS_XFS_H -#include -#endif - /* OS-specific file copy (copy_file_range, sendfile64, or copyfile). */ #if defined(__linux__) #include @@ -807,31 +803,6 @@ bool preallocate_fallocate64(tr_sys_file_t handle, uint64_t size) } #endif -#ifdef HAVE_XFS_XFS_H -bool full_preallocate_xfs(tr_sys_file_t handle, uint64_t size) -{ - if (platform_test_xfs_fd(handle) == 0) // true if on xfs filesystem - { - return false; - } - - xfs_flock64_t fl; - fl.l_whence = 0; - fl.l_start = 0; - fl.l_len = size; - - // The blocks are allocated, but not zeroed, and the file size does not change - bool ok = xfsctl(nullptr, handle, XFS_IOC_RESVSP64, &fl) != -1; - - if (ok) - { - ok = ftruncate(handle, size) == 0; - } - - return ok; -} -#endif - #ifdef __APPLE__ bool full_preallocate_apple(tr_sys_file_t handle, uint64_t size) { @@ -889,9 +860,6 @@ bool tr_sys_file_preallocate(tr_sys_file_t handle, uint64_t size, int flags, tr_ approaches.insert( std::end(approaches), { -#ifdef HAVE_XFS_XFS_H - full_preallocate_xfs, -#endif #ifdef __APPLE__ full_preallocate_apple, #endif