xattr: move to platform pkg, use cython, use bytes, use fd#3918
Merged
ThomasWaldmann merged 8 commits intoborgbackup:masterfrom Jul 7, 2018
Merged
xattr: move to platform pkg, use cython, use bytes, use fd#3918ThomasWaldmann merged 8 commits intoborgbackup:masterfrom
ThomasWaldmann merged 8 commits intoborgbackup:masterfrom
Conversation
Member
Author
|
Linux and macOS looks ok (see travis), will do other tests locally. Please review. |
Codecov Report
@@ Coverage Diff @@
## master #3918 +/- ##
==========================================
+ Coverage 85.04% 85.28% +0.23%
==========================================
Files 36 37 +1
Lines 9263 9185 -78
Branches 1545 1527 -18
==========================================
- Hits 7878 7833 -45
+ Misses 945 917 -28
+ Partials 440 435 -5
Continue to review full report at Codecov.
|
c041669 to
adb298d
Compare
Member
Author
|
tried freebsd12:
|
This was referenced Jul 3, 2018
Merged
Member
Author
|
about freebsd12 issues:
general issues:
consider api change:
cleanup:
|
a48452c to
5dd5ed5
Compare
8821d3c to
79abc5d
Compare
Merged
this code used to live in borg.xattr and used ctypes (and was the only ctypes-using code in borg). the low level code now was converted to cython and the platform code moved to platform package. got rid of the code that tried to find the libc.
- getxattr should only return bytes, not None - setxattr should not get a None value, just bytes - remove unneeded tmp vars
also: follow_symlinks param defaults to False (we do never use True) fix tests, xattrs are set via FD now.
if there is EPERM just for a single attr, it now still collects the other attrs (previous behaviour: just return empty xattrs dict).
when processing regular files, use a fd to query xattrs. when the file was modified and we chunked it, we have it open anyways. if not, we open the file once and then query xattrs, in the hope that this is more efficient than the path based calls. guess it is less prone to race conditions in any case.
79abc5d to
34a51eb
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this code used to live in borg.xattr and used ctypes
(and was the only ctypes-using code in borg).
the low level code now was converted to cython and
the platform code moved to platform package.
got rid of the code that tried to find the libc.