From: "J. Bruce Fields" Subject: Re: ACL on NFS, how make it work? Date: Wed, 8 Mar 2006 20:49:55 -0500 Message-ID: <20060309014955.GA8089@fieldses.org> References: <20060303103806.GB8038@sv.lnf.it> <20060303163535.GB32552@fieldses.org> <20060306090557.GD8429@sv.lnf.it> <20060306152340.GA31408@fieldses.org> <20060308170425.GS8060@sv.lnf.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andreas Gruenbacher , Marius Aamodt Eriksen , Jeff Sedlak , nfs@lists.sourceforge.net, Gopal Santhanam Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30) id 1FHAHz-0005hU-UF for nfs@lists.sourceforge.net; Wed, 08 Mar 2006 17:50:03 -0800 Received: from mail.fieldses.org ([66.93.2.214] helo=pickle.fieldses.org) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1FHAHz-0007xE-9r for nfs@lists.sourceforge.net; Wed, 08 Mar 2006 17:50:04 -0800 To: Marco Gaiarin In-Reply-To: <20060308170425.GS8060@sv.lnf.it> Sender: nfs-admin@lists.sourceforge.net Errors-To: nfs-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Post: List-Help: List-Subscribe: , List-Archive: On Wed, Mar 08, 2006 at 06:04:25PM +0100, Marco Gaiarin wrote: > Mandi! J. Bruce Fields > In chel di` si favelave... > > > Actually I got one other NFS/XFS ACL complaint recently, and confirmed > > that with current kernels I'm able to get and set ext3 ACL's over NFS, > > and get and set XFS ACL's locally, but I can't use XFS ACL's over NFS. > > Which is odd--on a first glance it looks like the two filesystems export > > posix acl's through the same interface, etc. I haven't had the chance > > to figure out what's going on yet.... > > If i can do something to debug that, say me. Could you try the following patch? Fixes the problem for me. --b. nfsd4: fix acl xattr length return We should be using the length from the second vfs_getxattr, in case it changed. (Note: there's still a small race here; we could end up returning -ENOMEM if the length increased between the first and second call. Oh well; I'm not sure it's worth spending a lot of effort to fix that.) Signed-off-by: J. Bruce Fields --- fs/nfsd/vfs.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 5320e5a..ac3a8e4 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -371,7 +371,6 @@ out_nfserr: static ssize_t nfsd_getxattr(struct dentry *dentry, char *key, void **buf) { ssize_t buflen; - int error; buflen = vfs_getxattr(dentry, key, NULL, 0); if (buflen <= 0) @@ -381,10 +380,7 @@ static ssize_t nfsd_getxattr(struct dent if (!*buf) return -ENOMEM; - error = vfs_getxattr(dentry, key, *buf, buflen); - if (error < 0) - return error; - return buflen; + return vfs_getxattr(dentry, key, *buf, buflen); } #endif ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs