xfs
[Top] [All Lists]

Re: [PATCH v10 38/46] richacl: Add support for unmapped identifiers

To: Andreas Gruenbacher <andreas.gruenbacher@xxxxxxxxx>
Subject: Re: [PATCH v10 38/46] richacl: Add support for unmapped identifiers
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 12 Oct 2015 11:22:00 +1100
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>, Andreas Dilger <adilger.kernel@xxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, Anna Schumaker <anna.schumaker@xxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-cifs@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1444604337-17651-39-git-send-email-andreas.gruenbacher@xxxxxxxxx>
References: <1444604337-17651-1-git-send-email-andreas.gruenbacher@xxxxxxxxx> <1444604337-17651-39-git-send-email-andreas.gruenbacher@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Oct 12, 2015 at 12:58:49AM +0200, Andreas Gruenbacher wrote:
> From: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
> 
> Some remote file systems like nfs may return user or group identifiers
> that cannot be mapped to local uids / gids.  Allow to represent such
> unmapped identifiers in richacls.  (We still cannot represent unmapped
> owners and owning groups, however.)
> 
> In the in-memory representation, the richacl is followed by a list of
> NUL-terminated strings, with no padding.  Entries with an unmapped
> identifier have the RICHACE_UNMAPPED_WHO flag set, and ace->e_id.offs
> specifies the offset into this list.  Multiple entries can refer to the
> same offset.
> 
> The xattr representation is similar, but ace->e_id is ignored, and the
> list of unmapped identifier strings contains a string for each acl entry
> whose RICHACE_UNMAPPED_WHO flag is set.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
....
> +/**
> + * richacl_has_unmapped_identifiers
> + *
> + * Check if an acl has unmapped identifiers.
> + */
> +bool richacl_has_unmapped_identifiers(struct richacl *acl)
> +{
> +     struct richace *ace;
> +
> +     richacl_for_each_entry(ace, acl) {
> +             if (ace->e_flags & RICHACE_UNMAPPED_WHO)
> +                     return true;
> +     }
> +     return false;
> +}
> +EXPORT_SYMBOL_GPL(richacl_has_unmapped_identifiers);

This was used by the XFS support patch earlier in the series. Bisect
problem here...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>