1
0
Fork 0

Update borg_sync_file_range.patch for borg v1.2.0a5 (2019-03-21).

This commit is contained in:
Casper V. Kristensen 2019-03-22 01:03:42 +01:00
parent d2598a2337
commit 433115bbc5
Signed by: caspervk
GPG key ID: 289CA03790535054

View file

@ -1,16 +1,13 @@
diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx 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 --- a/src/borg/platform/linux.pyx
+++ b/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx
@@ -225,8 +225,9 @@ def acl_set(path, item, numeric_owner=False): @@ -328,7 +328,7 @@ def _is_WSL():
cdef _sync_file_range(fd, offset, length, flags): return False
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')
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: