Non-trivial ACLs only?
Dr. Rolf Jansen
rj at obsigna.com
Thu Jul 17 00:49:31 UTC 2014
Am 16.07.2014 um 10:58 schrieb Edward Tomasz Napierała <trasz at FreeBSD.org>:
> On 0715T1831, Dr. Rolf Jansen wrote:
>> Am 15.07.2014 um 02:09 schrieb Edward Tomasz Napierała <trasz at FreeBSD.org>:
>>> On 0714T1614, Dr. Rolf Jansen wrote:
>>>> Anyway, I actually start wondering whether my file system cloning tool needs to address the ACLs via the respective API at all. It doesn't want to process any ACL, but if present, only transfer it from the original to the cloned file system item. I will have a closer look now on the posix1e.acl_access, posix1e.acl_default, and nfs4.acl extended attributes. Perhaps it is as simple, to straightly copy over everything what is in the extattr system name space.
>>>
>>> Not a good idea - those are UFS-specific; this won't work with ZFS or NFSv4.
>>
>> OK, I now check the file systems before skipping ACL reading, see the code snippet below.
>
> Seems ok.
>
>> I got another question though. Is it correct to assume that in the case of non-trivial Access/NFSv4 ACLs the acl_cnt is always greater than 3? This comes to my mind, because the standard UNIX access rights would always occupy 3 ACL entries, and any additional stuff would increase the count, right?
>
> Not with NFSv4 ACLs. There you might have less than three entries.
> You start with three (usually), but you can remove any of those,
> and the result will be non-trivial.
Edward,
Many thanks for your great help. I finished my optimization efforts successfully. My cloning tool now consumes much less system resources during file tree cloning and in addition cloning is now about 30 % faster. I submitted the changes to the repository at Google Code (https://code.google.com/p/clone/source/list), and I will also submit an update to the FreeBSD ports (http://www.freshports.org/sysutils/clone/) soon.
Best regards
Rolf
More information about the posix1e
mailing list