Subject: bug#40509: Use of fsetxattr() in cp tickles an EXT leak (possibly unnecessarily so)

From: Paul Eggert <[email-masked]>
Date: Wed, 8 Apr 2020 10:32:30 -0700

On 4/8/20 7:15 AM, Gregg Leventhal wrote:

> rsync doesn't make set/get xattr calls and purports to preserve ACLs with
> -A.

I'm not quite following your bug report, but it appears that you're saying that 
cp could somehow discover that it needn't use fgetxattr and fsetxattr on files 
that lack extended attributes, and for those files cp could stick with ordinary 
POSIX syscalls (e.g., umask, chmod) to give files proper permissions, and in 
that case 'cp' would presumably (a) operate more efficiently and (b) not trigger 
a bug in the EXT filesystem.

This sounds like a worthy suggestion, though of course it would be better to 
have a concrete proposal in the form of a coreutils patch, along with a few 
performance measurements. For starters, how does rsync do it?

Also, of course EXT should be fixed regardless of what coreutils does here.