All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Marius Aamodt Eriksen <marius@umich.edu>,
	Jeff Sedlak <jsedlak@umich.edu>,
	linux-fsdevel@vger.kernel.org, nfs@lists.sourceforge.net
Subject: Re: Problems with POSIX ACL <=> NFSv4 ACL mapping in mainline
Date: Fri, 23 Jun 2006 12:06:52 -0400	[thread overview]
Message-ID: <20060623160652.GK21357@fieldses.org> (raw)
In-Reply-To: <200606231745.23344.agruen@suse.de>

On Fri, Jun 23, 2006 at 05:45:22PM +0200, Andreas Gruenbacher wrote:
> they don't map onto each other very well. Marius and others are proposing a 
> mapping between the two formats [3], and an implementation of that mapping 
> seems to have found its way into the mainline nfsv4 implementation. (Note 
> that I didn't actually verify the implemented mapping actually reflects draft 
> [3].)

It doesn't; the implementation is based on the previous version.  The newer
version requires the server to perform a (possibly lossy) mapping of virtually
any NFSv4 ACL, whereas the previous (currently implemented) version only
accepted a very small subset of possible NFSv4 ACLs.

> The CITI has patches that try to work around this in libacl by trying both 
> POSIX ACLs and "system.nfs4_acl" attributes, and converting between the two 
> if necessary. This approach has a number of disadvantages: (1) applications 
> that don't use libacl will still fail

Are there particular examples of such applications that you're thinking of?

> (2) always trying both formats without knowing the properties of the
> underlying filesystem will always be slow,

How much slower?  I'd expect the cost of one system call (which just
immediately returns -ENOTSUPP) to be insignificant.

> In addition, I could imagine that we'll optionally support local NFSv4-style
> ACLs on specific file systems somewhen in the future. (Samba would benefit
> greatly from that for example; Solaris already can do that.) Not being able
> to tell the one kind of ACLs from the other in a world where we may have both
> sounds like a recipe for disaster to me.

I'm not following you.  Currently nfsv4 and posix acls are being presented to
userspace via different extended attributes, so you can tell one type from the
other.

> I could imagine the following solutions to this problem:
> 
> * Don't map between POSIX ACLs and NFSv4 ACLs at all, and use a different
> protocol for POSIX ACLs and for NFSv4 ACLs instead (e.g., version 4 of the
> NFSACL protocol extension). The protocol extension is not currently
> implemented in Solaris because current Solaris supports NFSv4 ACLs natively
> instead of POSIX ACLs, and so they don't seem to have as strong a motivation
> to keep POSIX ACLs working well as we currently do. The NFSACL protocol has
> the huge advantage of supporting POSIX ACLs pretty well, and so a lot of the
> overhead and complexity of doing the NFSv4 mapping would go away though.

If you wanted to support *both* POSIX and NFSv4 ACLs, then you'd still have the
same problem.  Unless you expect it to be possible to set both types of ACLs on
the same file independently, and make the kernel enforce the AND of the two, or
something like that.  I don't think that would be helpful.

> * Map back from NFSv4 ACLs to POSIX ACLs on the client side, so that POSIX
> ACLs on the server will appear as POSIX ACLs on the client. This would take
> away all the mess we currently have in user-space

And put it in the kernel instead?  We originally did exactly that, and Trond
argued that we should do this in userspace instead.  I still think that was the
right decision.

I'm not satisfied with the current situation either.  But I don't think Samba
or NFSv4 will ever be completely happy until we provide good support for
NFSv4/Windows-style ACLs.  We can't rip out POSIX ACLs in the process, so we're
going to have to support both.  I don't see how to support both well without
mapping between them.  And if we've got to do this complicated mapping, let's
do it in userspace whenever possible.

--b.

  reply	other threads:[~2006-06-23 16:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-23 15:45 Problems with POSIX ACL <=> NFSv4 ACL mapping in mainline Andreas Gruenbacher
2006-06-23 16:06 ` J. Bruce Fields [this message]
2006-06-26 15:30   ` Andreas Gruenbacher
2006-06-26 16:23     ` J. Bruce Fields
2006-06-26 17:52     ` Andreas Dilger
2006-06-26 18:07       ` Andreas Gruenbacher
2006-06-26 18:57         ` Andreas Dilger
2006-06-24 13:21 ` [NFS] " Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060623160652.GK21357@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=agruen@suse.de \
    --cc=jsedlak@umich.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=marius@umich.edu \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.