From 39922e88e57aa221cd09b807506f02ebcab513d6 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 17 Feb 2019 02:46:03 +0100 Subject: [PATCH] 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 --- src/borg/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index eb887218b..e14be30a6 100644 --- a/src/borg/archive.py +++ b/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)