From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 4/4] fs: take the ACL checks to common code Date: Sun, 24 Jul 2011 15:07:33 +0200 Message-ID: <20110724130733.GA26691@lst.de> References: <20110723153621.GA10832@lst.de> <20110723153731.GD10887@lst.de> <20110723160000.GA11196@lst.de> <20110723161516.GH24703@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Linus Torvalds , linux-fsdevel To: Al Viro Return-path: Received: from verein.lst.de ([213.95.11.211]:59726 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752694Ab1GXNHe (ORCPT ); Sun, 24 Jul 2011 09:07:34 -0400 Content-Disposition: inline In-Reply-To: <20110723161516.GH24703@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Jul 23, 2011 at 05:15:16PM +0100, Al Viro wrote: > > Yes, and if we add a ->set_acl we can take most of the existing boilerplate > > code completely into posix_acl.c. I'll see if I can do something like that > > for v3.2. > > As for ->set_acl(), how are you going to deal with things like ext3_init_acl(), > where we get transaction handle as argument and pass it down to ext3_set_acl()? > Or the things like e.g. gfs2_set_mode()... ext3/4 already store the handle_t (what an awfully misleading name, btw) in current->journal_info for similar cases where they want to keep to access it when doing detours through common code. Similar for gfs2 and gfs2_trans. I'll have to look into it in more details. So far my plan is: - add a generic xattr method for reading ACLs, we already have can do that just based on ->get_acl - add a generic xattr method (and thus set of xattr ops) for writing ACLs, and add ->set_acl for it. - then look into how we can sanely factor the more complicated operations