All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nico Williams <nico@cryptonector.com>
To: Marc Eshel <eshel@us.ibm.com>
Cc: nfsv4@ietf.org, Mailing List Linux NFS <linux-nfs@vger.kernel.org>
Subject: Re: [nfsv4] XATTRs in NFS
Date: Mon, 28 Oct 2013 18:02:29 -0500	[thread overview]
Message-ID: <20131028230206.GH15988@gmail.com> (raw)
In-Reply-To: <OF9D091881.D4CDB064-ON88257C12.007629C1-88257C12.007B7AFE@us.ibm.com>

On Mon, Oct 28, 2013 at 03:28:42PM -0700, Marc Eshel wrote:
> This is a clean start to discuss extended attributes over NFS in the 
> mailing list first. 
> 
> 1. What are the requirements and why? which applications are using them 
> and how. 

Surely the requirements would be semantic compatibility with Linux's
xattrs.  These are defined in manpages such as getxattr(2).  Links can
be easily found online.

: ; man -s2 -k xattr
fgetxattr (2)        - retrieve an extended attribute value
flistxattr (2)       - list extended attribute names
fremovexattr (2)     - remove an extended attribute
fsetxattr (2)        - set an extended attribute value
getxattr (2)         - retrieve an extended attribute value
lgetxattr (2)        - retrieve an extended attribute value
listxattr (2)        - list extended attribute names
llistxattr (2)       - list extended attribute names
lremovexattr (2)     - remove an extended attribute
lsetxattr (2)        - set an extended attribute value
removexattr (2)      - remove an extended attribute
setxattr (2)         - set an extended attribute value
: ; 

Whether there are apps that use them is a different story.  I've no
idea, but here's a github search for code using getxattr:

https://github.com/search?q=getxattr&ref=cmdform&type=Code

Many of the results are from clones of Android, so one has to wade a
fair bit to find apps.  Things like this:

https://github.com/protonet/xattr
https://github.com/jarib/ffi-xattr

make it harder to tell what's using them.

Then we have:

https://github.com/search?q=getxattr&ref=cmdform&type=Issues

which is a bit better, since this brings up more issues with apps using
xattrs and fewer about implementations of xattrs, like:

https://github.com/Cocoanetics/DTFoundation/issues/37

Even then, most of the issues (only 5 pages) relate to filesystems and
FUSE.

Interesting data point: both, an OS X port of ZFS, and ZFSOnLinux felt
the need to add support for xattrs.

The only apps I found this way are the above DTFoundation, Ruby FFI
bindings of xattrs, and:

https://github.com/tobiaswaldvogel/openwrt-addpack
https://github.com/mxcl/homebrew
https://github.com/scrod/nv
https://github.com/ShareKit/ShareKit

> 2. Why are current named attributes in NFS not the right answer.

They have different semantics and namespaces.

xattrs are small, bite-sized.

Named attributes as files within files -"forks"- and align well with
openat(2) but not with *xattr(2).

> 3. What does the new protocol enhancements should look like? 

Probably like direct equivalents of the xattrs system calls as OPs
operating on the current FH.  This seems like the simplest question to
answer.

I'm not advocating adding xattrs to the protocol.  I'm not sure there's
a real case for this.  Developers ought to be using openat(2) more and
xattrs less.  Forks interop better with, e.g., Win32, than xattrs.

Perhaps xattrs could be implemented as a conventional mapping onto named
attributes.  This would require agreement by many people, including
implementors of filesystems that already have both features, so it seems
unlikely, except, perhaps, via reserving named attribute namespace for
implementation purposes, but even that I think is (IIRC) not allowable
for NFSv4 (i.e., the named attribute namespace is already wide open for
use by the public).

This really brings up a different matter: to the extent that xattrs and
named attributes are used to store application data (as opposed to
arbitrary user-named attributes) perhaps we ought to have a registry for
naming them.

Nico
-- 

  parent reply	other threads:[~2013-10-28 23:03 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 20:37 XATTRs in NFS? Christoph Anton Mitterer
2013-10-24  8:45 ` Myklebust, Trond
2013-10-24 14:13   ` Christoph Anton Mitterer
2013-10-24 14:32     ` Myklebust, Trond
2013-10-24 15:07       ` Simo Sorce
2013-10-24 15:11         ` Myklebust, Trond
2013-10-24 15:16           ` Simo Sorce
2013-10-24 15:23             ` Jeff Layton
2013-10-24 15:29               ` Matt W. Benjamin
2013-10-24 15:53               ` Myklebust, Trond
2013-10-24 16:10               ` Christoph Anton Mitterer
2013-10-24 15:27             ` Myklebust, Trond
2013-10-24 16:01       ` Christoph Anton Mitterer
2013-10-24 16:30         ` Myklebust, Trond
2013-10-24 17:22           ` Christoph Anton Mitterer
2013-10-25 14:08             ` J. Bruce Fields
2013-10-25 15:26               ` Ric Wheeler
2013-10-25 15:32                 ` Chuck Lever
2013-10-26 18:00                   ` Christoph Anton Mitterer
2013-10-26 13:20                 ` Myklebust, Trond
     [not found]                   ` <OF01D9818B.36018C0F-ON88257C10.00608BC0-88257C10.006139C6@LocalDomain>
2013-10-26 17:46                     ` Marc Eshel
2013-10-27 12:48                       ` Myklebust, Trond
2013-10-28  0:14                         ` Christoph Anton Mitterer
2013-10-28  0:19                           ` Myklebust, Trond
2013-10-28  0:23                             ` Christoph Anton Mitterer
2013-10-28 13:25                         ` James Morris
2013-10-28 15:41                           ` Ric Wheeler
2013-10-26 17:12               ` Christoph Anton Mitterer
2013-10-27 19:15                 ` J. Bruce Fields
2013-10-27 21:57                   ` Christoph Anton Mitterer
2013-10-28  0:17                     ` Myklebust, Trond
2013-10-28  0:27                       ` Christoph Anton Mitterer
2013-10-28  0:44                         ` Myklebust, Trond
2013-10-28  1:04                           ` Christoph Anton Mitterer
2013-10-28 15:40                           ` Ric Wheeler
2013-10-28 16:15                             ` Christoph Anton Mitterer
2013-10-28 17:49                               ` Myklebust, Trond
2013-10-28 18:00                                 ` Ric Wheeler
2013-10-28 18:08                                   ` Dr Fields James Bruce
2013-10-28 18:31                                     ` Ric Wheeler
2013-10-28 20:44                                       ` Marc Eshel
2013-10-28 20:49                                         ` [nfsv4] " Spencer Shepler
2013-10-28 20:55                                         ` Haynes, Tom
2013-10-28 21:02                                           ` J. Bruce Fields
2013-10-28 21:04                                             ` Chuck Lever
2013-10-28 21:28                                               ` Marc Eshel
     [not found]                                               ` <OF3A48E6D9.7BB93CB0-ON88257C12.0075527E-88257C12.0075F065@LocalDomain>
2013-10-28 22:28                                                 ` XATTRs in NFS Marc Eshel
2013-10-28 22:41                                                   ` Marc Eshel
     [not found]                                                     ` <5272742D.7000905@redhat.com>
2013-10-31 20:54                                                       ` Anand Avati
2013-10-31 21:36                                                         ` [nfsv4] " Nico Williams
2013-10-28 23:02                                                   ` Nico Williams [this message]
2013-10-28 21:28                                             ` [nfsv4] XATTRs in NFS? Marc Eshel
     [not found]                                     ` <526EC3F7.3090601@gmail.com>
2013-10-29  0:22                                       ` Fwd: " Anand Avati
2013-10-29  0:39                                         ` Christoph Anton Mitterer
2013-10-29  0:53                                           ` Myklebust, Trond
2013-10-29  1:04                                             ` Christoph Anton Mitterer
2013-10-29  0:49                                         ` Myklebust, Trond
2013-10-29  1:00                                           ` Ric Wheeler
2013-10-29  1:26                                             ` Myklebust, Trond
2013-10-29  1:24                                               ` Anand Avati
2013-10-29  1:52                                                 ` Myklebust, Trond
2013-10-29  2:22                                                   ` Anand Avati
2013-10-29  1:39                                               ` Christoph Anton Mitterer
2013-10-29  2:28                                                 ` Myklebust, Trond
2013-10-29  4:27                                                   ` Marc Eshel
2013-10-28 21:34                                   ` Matt W. Benjamin
2013-10-28 18:15                                 ` Christoph Anton Mitterer

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=20131028230206.GH15988@gmail.com \
    --to=nico@cryptonector.com \
    --cc=eshel@us.ibm.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nfsv4@ietf.org \
    /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.