Re: Possible bug in qcopy-acl.c

2023-09-01 Thread Paul Eggert

On 2023-09-01 11:47, Ondrej Valousek wrote:

If it returns 1, then we probably don't care about few more syscalls because in 
most cases we copy files w/o acls.


I think I'd care about unnecessary syscalls if I were using a filesystem 
with ACLs.




Re: Possible bug in qcopy-acl.c

2023-09-01 Thread Ondrej Valousek
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 
Sent: Friday, September 1, 2023 8:20:12 PM
To: Ondrej Valousek 
Cc: Gnulib bugs 
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.


Re: Possible bug in qcopy-acl.c

2023-09-01 Thread Paul Eggert

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.