Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1359425

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

From Andreas Gruenbacher <agruenba@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes
Date 2016-03-16 23:40 +0100
Message-ID <rdsgF-71y-3@gated-at.bofh.it> (permalink)
References <r7rdD-tJ-3@gated-at.bofh.it> <r7rdD-tJ-9@gated-at.bofh.it> <rbvVo-7ms-13@gated-at.bofh.it> <rby6R-sb-5@gated-at.bofh.it> <rcRqO-7hA-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Mar 15, 2016 at 8:12 AM, Christoph Hellwig <hch@infradead.org> wrote:
> On Fri, Mar 11, 2016 at 05:24:45PM +0100, Andreas Gruenbacher wrote:
>> POSIX ACLs and RichACLs are different objects, with different members
>> and different algorithms operating on them. The only commonality is
>> that they are both kmalloc()ed, reference counted objects, and when an
>> inode is destroyed, both kinds of ACLs can be put in the same way,
>> avoiding an unnecessary if. What kind of common-code container beyond
>> that are you still dreaming about?
>
> We still have a main object that is simply a list of ACEs.  But if that
> doesn't work out (I suspect it should) I don't think the common base
> object is a good idea.  It just leads to a lot of crazy container_of
> calls.

There are two such container_of calls for POSIX ACLs in fs/jffs2/acl.c
[which could be replaced by get_acl()], two in fs/posix_acl.c for
POSIX ACLs, and two in fs/richacl.c for RichACLs. That's it.

> If the common object abstraction doesn't work out we'll need
> a procedural one instead that has common acl_* calls that decide what
> do to based on the file system acl flag.

I've already made such abstractions where it made sense; if you can
find more, I don't see why we shouldn't add them.

Thanks,
Andreas

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes Christoph Hellwig <hch@infradead.org> - 2016-03-11 15:10 +0100
  Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes Andreas Gruenbacher <agruenba@redhat.com> - 2016-03-11 17:30 +0100
    Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes Christoph Hellwig <hch@infradead.org> - 2016-03-15 08:20 +0100
      Re: [PATCH v18 11/22] vfs: Cache base_acl objects in inodes Andreas Gruenbacher <agruenba@redhat.com> - 2016-03-16 23:40 +0100

csiph-web