diff --git a/borg_sync_file_range.patch b/borg_sync_file_range.patch index 9813709..c11c66b 100644 --- a/borg_sync_file_range.patch +++ b/borg_sync_file_range.patch @@ -1,16 +1,13 @@ diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx -index 25f71fa1..42ffa85f 100644 +index 2143ea57..29948baa 100644 --- a/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx -@@ -225,8 +225,9 @@ def acl_set(path, item, numeric_owner=False): - cdef _sync_file_range(fd, offset, length, flags): - assert offset & PAGE_MASK == 0, "offset %d not page-aligned" % offset - assert length & PAGE_MASK == 0, "length %d not page-aligned" % length -- if sync_file_range(fd, offset, length, flags) != 0: -- raise OSError(errno.errno, os.strerror(errno.errno)) -+ os.fdatasync(fd) -+ #if sync_file_range(fd, offset, length, flags) != 0: -+ # raise OSError(errno.errno, os.strerror(errno.errno)) - safe_fadvise(fd, offset, length, 'DONTNEED') +@@ -328,7 +328,7 @@ def _is_WSL(): + return False - cdef unsigned PAGE_MASK = sysconf(_SC_PAGESIZE) - 1 + +-if _is_WSL(): ++if True: + class SyncFile(BaseSyncFile): + # if we are on Microsoft's "Windows Subsytem for Linux", use the + # more generic BaseSyncFile to avoid issues like seen there: