Explorar o código

micro-opt: get xattrs directly before acls

on linux, acls are based on xattrs, so do these closeby:

1. listxattr -> keys (without acl related keys)
2. for all keys: getxattr
3. acl-related getxattr by acl library
Thomas Waldmann %!s(int64=6) %!d(string=hai) anos
pai
achega
39922e88e5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/borg/archive.py

+ 1 - 1
src/borg/archive.py

@@ -954,9 +954,9 @@ class MetadataCollector:
         attrs = {}
         bsdflags = 0
         with backup_io('extended stat'):
-            xattrs = xattr.get_all(fd or path, follow_symlinks=False)
             if not self.nobsdflags:
                 bsdflags = get_flags(path, st, fd=fd)
+            xattrs = xattr.get_all(fd or path, follow_symlinks=False)
             acl_get(path, attrs, st, self.numeric_owner, fd=fd)
         if xattrs:
             attrs['xattrs'] = StableDict(xattrs)