Subject: Performance: if an fs reports EOPNOTSUPP for xattr/acl calls, don't
keep trying
Date: Sat, 20 Apr 2019 18:25:02 +0200
Package: rsync
Version: 3.1.3-6
Severity: wishlist
Tags: upstream
Hi,
according to strace -c, getxattr() and similar calls can take up a lot of
runtime (around ten percent) if there are many files to be synced and other
stuff (I/O, network) is reasonably fast.
It would make sense for rsync to skip such calls for files on a filesystem
that replied with EOPNOTSUPP and save some time.
The stat() family of calls tell rsync which fs the file is on, so that you
just need to wrap the ACL/xattr calls in a wrapper that checks whether the
fs in question is known to not support ACLs/xattrs before calling the actual
syscall/library function.
Counterarguments:
1. "don't call rsync with -AX if your fs doesn't support ACLs/xattrs".
Apparently valid, but maybe I'm syncing a huge tree with more than one
mountpoint, and some of the mounted filesystems support ACLs/xattrs while
others don't.
2. it's possible for an fs to be remounted with ACL/xattr support while
rsync is running; if my suggestion were implemented, rsync could miss some
ACLs/xattrs. My response to that is "don't do that then". :)
András
--
I spilled spot remover on my dog, and now he's gone!
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.