xfs
[Top] [All Lists]

Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes

To: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Subject: Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 11 Mar 2016 06:07:46 -0800
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, linux-nfs@xxxxxxxxxxxxxxx, Theodore Ts'o <tytso@xxxxxxx>, linux-cifs@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Andreas Dilger <adilger.kernel@xxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, Jeff Layton <jlayton@xxxxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, Anna Schumaker <anna.schumaker@xxxxxxxxxx>, jaegeuk@xxxxxxxxxx, chao2.yu@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1456733847-17982-12-git-send-email-agruenba@xxxxxxxxxx>
References: <1456733847-17982-1-git-send-email-agruenba@xxxxxxxxxx> <1456733847-17982-12-git-send-email-agruenba@xxxxxxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
On Mon, Feb 29, 2016 at 09:17:16AM +0100, Andreas Gruenbacher wrote:
> POSIX ACLs and richacls are both objects allocated by kmalloc() with a
> reference count which are freed by kfree_rcu().  An inode can either
> cache an access and a default POSIX ACL, or a richacl (richacls do not
> have default acls).  To allow an inode to cache either of the two kinds
> of acls, introduce a new base_acl type and convert i_acl and
> i_default_acl to that type. In most cases, the vfs then doesn't care which
> kind of acl an inode caches (if any).

This base_acl object is pointless.  I've asked in the past to have
a proper container for the ACLs in common code, but a union
of a refcount and a rcu head doesn't really fit that category.

But this points out that the f2fs folks really need a couple of
slaps on their hands.  Not if generic funtionality doesn't
fit your needs you are not going to blindly copy and paste it,
please talk to find a solution instead of duplicating it.

Folks, please come up with a suggestion to get rid of f2fs_acl_clone,
f2fs_acl_create_masq and f2fs_acl_create ASAP.

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