This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * faultread2.c - reproduce the FreeBSD vn_io_fault1() bug: the EFAULT-redo offset | |
| * (resid - uio->uio_resid, a size_t) is passed to uiomove(void *, int, struct uio *), | |
| * so a first attempt that copied out >= 2 GiB before hitting a non-resident user page | |
| * leaves the clone un-advanced and the retry loop double-counts the progress. | |
| * | |
| * Usage: faultread2 <file> <resident_prefix_bytes> [file_offset=18] | |
| * The user buffer is a fresh anonymous mapping; only the first <resident_prefix_bytes> | |
| * are touched before the read(), so the first non-resident page sits right after them. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/borg/hashindex.pyx b/borg/hashindex.pyx | |
| index 6652e05..0b4dc26 100644 | |
| --- a/borg/hashindex.pyx | |
| +++ b/borg/hashindex.pyx | |
| @@ -37,7 +37,8 @@ cdef class IndexBase: | |
| def __cinit__(self, capacity=0, path=None, key_size=32): | |
| self.key_size = key_size | |
| if path: | |
| - self.index = hashindex_read(os.fsencode(path)) | |
| + path = os.fsencode(path) |