I am not sure if I understand. I mean, we have to call file-has-acl() function there anyway right? If it returns 0, then we are can also return the function as there is nothing else to do (well unless the dst file exists and has ACLs on it already).
If it returns 1, then we probably don't care about few more syscalls because in most cases we copy files w/o acls. Ondrej Zasláno z Outlooku pro Android<https://aka.ms/AAb9ysg> ________________________________ From: Paul Eggert <egg...@cs.ucla.edu> Sent: Friday, September 1, 2023 8:20:12 PM To: Ondrej Valousek <ondrej.valousek...@renesas.com> Cc: Gnulib bugs <bug-gnulib@gnu.org> Subject: Re: Possible bug in qcopy-acl.c On 2023-09-01 04:24, Ondrej Valousek wrote: > The disadvantage of it would be the additional call for file-has-acl() so > hence few more kernel calls. Can the extra syscalls be avoided by migrating/copying some of file-has-acl.c's functionality into qcopy-acl.c? The idea would be to invoke listxattr just once in the usual case, to handle both file_has_acl checking and qcopy_acl copying.