2013-10-31 20:54:46

by Anand Avati

[permalink] [raw]
Subject: Re: XATTRs in NFS


> -------- Original Message --------
> Subject: XATTRs in NFS
> Date: Mon, 28 Oct 2013 15:41:37 -0700
> From: Marc Eshel <[email protected]>
> To: Marc Eshel <[email protected]>
> CC: Mailing List Linux NFS <[email protected]>,
> [email protected], [email protected]
>
>
>
> 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.

Reiterating, one of the applications (glusterfs - a distributed
filesystem) has been using filesystems with extended attribute support
by annotating files and dirs with crucial info for its operation (uses
xattrs as a dumb key/value store). Usage of xattrs is crucial for the
operation as glusterfs avoids using any sort of "external" meta-data
database or metadata server for its operation (as a philosophy/design
principle focused on robustness). Lack of xattrs on NFS prevents using
NFS volumes as gluster bricks.

To that end, if NFS can map user.XXX values to user.XXX named attributes
and vice versa in the NFS client and NFS server respectively, that would
make NFS volumes be usable as gluster bricks.

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

I think they might be, if we can map user.XXXX xattrs to named
attributes and avoid any sort of interpretation of they key/values by
NFS. Though from my point of view, all I care is for getxattr/setxattr
of user.XXX keys to "just work" (whether they are mapped to named
attributes or implemented as a separate feature).

Avati

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




2013-10-31 21:37:16

by Nico Williams

[permalink] [raw]
Subject: Re: [nfsv4] XATTRs in NFS

On Thu, Oct 31, 2013 at 01:54:47PM -0700, Anand Avati wrote:
> >2. Why are current named attributes in NFS not the right answer.
>
> I think they might be, if we can map user.XXXX xattrs to named
> attributes and avoid any sort of interpretation of they key/values
> by NFS. Though from my point of view, all I care is for
> getxattr/setxattr of user.XXX keys to "just work" (whether they are
> mapped to named attributes or implemented as a separate feature).

That's an open question. Are writes to xattrs supposed to be atomic?

Anyways, it seems at least one filesystem (XFS) maps xattrs onto a
hidden data fork (named attribute) for that purpose. So, I'm guessing:
a) no, they're not atomic, b) named attributes should work... c) if
only we had a namespace to steal names from for this purpose.

Nico
--