From: Christoph Hellwig Subject: Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes Date: Fri, 11 Mar 2016 06:07:46 -0800 Message-ID: <20160311140746.GC14808@infradead.org> References: <1456733847-17982-1-git-send-email-agruenba@redhat.com> <1456733847-17982-12-git-send-email-agruenba@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , "J. Bruce Fields" , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Theodore Ts'o , linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Trond Myklebust , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, xfs-VZNHf3L845pBDgjK7y7TUQ@public.gmane.org, Christoph Hellwig , Andreas Dilger , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jeff Layton , linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Anna Schumaker , jaegeuk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, chao2.yu-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org To: Andreas Gruenbacher Return-path: Content-Disposition: inline In-Reply-To: <1456733847-17982-12-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-ext4.vger.kernel.org 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. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html