NFSv4 ACL support in star

Joerg Schilling Joerg.Schilling at fokus.fraunhofer.de
Sun Nov 10 17:12:06 UTC 2013


Edward Tomasz Napiera?a <trasz at FreeBSD.org> wrote:

> >> Use the usual pathconf(3), with _PC_ACL_NFS4.
> > 
> > This looks like an interface that is not optimized for performance.
> > 
> > pathconf(name, _PC_ACL_ENABLED)
> > 
> > returns
> > 
> > _ACL_ACLENT_ENABLED	(1)	if the filesystem supports UFS ACLs
> > _ACL_ACE_ENABLED	(2)	if the filesystem supportfs NFSv4 ACLs
> > 
> > or a bitwise or of both.
> > 
> > But if you implement another performant method I am OK. 
>
> As Tim said, you probably already need to call stat on every file
> added; just reuse the value returned by pathconf if st_dev for the
> file is the same as st_dev for the previous file.  That's what all
> the utilities such as ls(1) do

The problem I see is that star first calls lstat() and the acl library would to 
it again...

On my development system, star needs 8 usec per empty file to archive (in case 
it is told to create the enhanced pax format I call "exustar"). It takes 40 
additional usecs if I let it archive ACLs also. It would be nice if there is 
less additional time and this tells me that I need to check libsec for possible 
improvements.

> > It may look so but there are related ACE entries and these ACEs carry ephemeral 
> > UID/GID values.
>
> Ah, the appended ID.  So, acl_to_text_np(3) takes ACL_TEXT_APPEND_ID flag,
> which makes it output textual form with appended IDs; the acl_from_text(3)
> handles appended ID automatically.

Star needs to do this in order to implement the option -numeric and this is why 
I prepare the ACL text data before I give it to acl_fromtext().

> > Well, it would be nice to see feedback from Linux people.
>
> Definitely.

Let's see whether there is feedback. It may be that there is currently still 
room for a change on both sides. Once people start to implement portable 
applications that support FreeBSD also, Linux may be forced to implement 
something compatible to FreeBSD.

Jörg

-- 
 EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js at cs.tu-berlin.de                (uni)  
       joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily


More information about the posix1e mailing list