From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [PATCH v3 2/3] hfsplus: add implementation of the ACLs support Date: Tue, 5 Mar 2013 11:32:23 -0500 Message-ID: <20130305163223.GA14668@fieldses.org> References: <1362324572.29435.42.camel@slavad-ubuntu-12.04> <20130304212638.GJ20389@fieldses.org> <1362466376.2572.25.camel@slavad-ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Andrew Morton , Christoph Hellwig , Al Viro , Hin-Tak Leung To: Vyacheslav Dubeyko Return-path: Received: from fieldses.org ([174.143.236.118]:44149 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757555Ab3CEQc3 (ORCPT ); Tue, 5 Mar 2013 11:32:29 -0500 Content-Disposition: inline In-Reply-To: <1362466376.2572.25.camel@slavad-ubuntu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Mar 05, 2013 at 10:52:56AM +0400, Vyacheslav Dubeyko wrote: > On Mon, 2013-03-04 at 16:26 -0500, J. Bruce Fields wrote: > > On Sun, Mar 03, 2013 at 07:29:32PM +0400, Vyacheslav Dubeyko wrote: > > > From: Vyacheslav Dubeyko > > > Subject: [PATCH v3 2/3] hfsplus: add implementation of the ACLs support > > > > > > This patch adds implementation of the ACLs support for hfsplus driver. > > > > Much of this actually appears to have started as a cut-and-paste of > > fs/nfsd/nfs4acl.c. > > > > Could you explain what you needed to change from the nfsd code? > > > > It looks like we should be able to share at least some of this code > > instead of copying it. The posix<->NFSv4 ACL mapping is a bit tricky > > and I'd prefer we not have to fix bugs in two different instances of it. > > > > Yes, I totally agree with you. I used fs/nfsd/nfs4acl.c as a basis for > implementation of ACLs support in hfsplus. But it was a first step > because I can't used implemented in nfsd functionality without changes. > The ACLs in hfsplus have some peculiarities (special raw ACLs > representation and slightly special set of flags) and I needed to > achieve first of all working implementation of ACLs support. Now it is > done and I think over how to share common code between hfsplus and nfsd. > Maybe it can be useful and for other drivers. As a preliminary vision, I > think that we can have something like pair of files: > include/linux/nfsv4_acl.h (declarations) and fs/nfsv4_acl.c > (implementation). The implementation should share common code with > possibility to implement specialized part functionality in the concrete > driver. Sure. > > Also: have you looked at the latest rich ACL patches? That would > > provide a native interface to NFSv4-like ACLs, which would really be > > much more useful. > > > > Could you point out about what patches you are talking? Maybe these > patches correct my vision of sharing code between hfsplus and nfsd. They implement NFSv4-like ACLs for ext4, and hook them up to nfs and nfsd: http://www.bestbits.at/richacl/ Ideally hfsplus would use the same interface. The translation wouldn't be perfect, but it'd be easier than posix<->nfsv4. The last review I can find is: http://marc.info/?l=linux-fsdevel&m=131944979121959&w=2 which comes across as a rant, but I think there are some concrete things to work on there that just need a volunteer to take on. --b.