Subject: [nfsv4] review of draft-naik-xattrs-02

From: David Noveck <[email-masked]>
Date: Tue, 28 Jul 2015 05:51:13 -0400

*Overall comments*

I think this document takes a fundamentally correct approach to the issue.
Also, it is fairly far along.

I believe it should become a working group document relatively soon.   This
is so even though it needs progress on other documents before it could be
considered as a standards track document by the IESG.

I have a whole bunch of comments/corrections to be considered listed in the
sections below.  Almost all of these are quite minor and the majority are
editorial issues.  I've tried to make sure we have the option of making
xattrs an extension to v4.2 if there is significant progress on
draft-ietf-nfsv4-versioning, while maintaining a fallback to put this into
a small v4.3 if that should be necessary.

The only cases in which I discuss potential substantive changes to the
protocol are:

   - I think you need to have SETXATTR and REMOVEXATTR return the current
   change time as of the update done by the xattr operation.
   - Proposed changes regarding handling of setxattr_type4.
   - Some sort of revision is needed regarding  ACE4_{GET,SET}_XATTRS

There are a couple of cases where I indicate issues that might not need to
be dealt with right away but might turn into issues when this goes to the
IESG.

   - Internationalization considerations for xattr names :-(
   - The issue of a potential IANA registry for extended attribute names,

*Comments by Section*

*Abstract:*

Suggest replacing the first sentence by:

This document proposes extensions to the NFSv4 protocol which allow
file extended attributes (hereinafter also referred to as xattrs) to
be manipulated using NFSv4.

My stab at addressing the singular/plural conundrum in the second sentence
replaces the sentence by the following two sentences:

Support for xattrs is a file system feature that allows opaque metadata,
not interpreted by the file system, to be associated with files and
directories. Such support is present in many modern local file systems.

Suggest adding "are provided" to the end of the last sentence.

*Introduction:*

In the last sentence of the first paragraph suggest replacing "read from,
and write to" by "interrogate, and modify".

In the second sentence of the second paragraph, suggest replacing "on the
underlying file system"
by  "within the underlying file system".

Suggest replacing the third paragraph by the following:

Extended attributes have previously been considered unsuitable for portable
use because some aspects of their handling are not precisely defined and
they are not formally documented by any standard (such as POSIX).
Nevertheless, it appears that xattrs are widely deployed and their support
in modern disk-based file systems is nearly universal.

Suggest replacing the first sentence of the fourth paragraph by the
following:

There is no clear specification of how xattrs could be mapped to any
existing file attributes defined in RFC 5661 [2].  As a result, most
NFSv4 client implementations ignore application-specified xattrs.

Suggest replacing in the second sentence of the fourth paragraph, "This" by
"This state of affairs".

Suggest the following in place of the existing fifth paragraph:

There is thus a need to provide a means by which such data loss can be
avoided.  This will involve exposing xattrs within the NFSv4 protocol,
despite the lack of completely compatible file system implementations.

Suggest the following in place of the existing sixth paragraph.

This document discusses (in Section 5) the reasons that NFSv4 named
attributes as currently standardized in [2
<https://tools.ietf.org/html/draft-naik-nfsv4-xattrs-02#ref-2>], are
unsuitable for representing xattrs.  Instead, it proposes a separate
protocol mechanism to support xattrs.  As a consequence, xattrs and
named attributes will both be optional features with servers free to
support either, both, or neither.

*Use cases:*

In the last sentence of the second paragraph suggest the following changes:

   - Replace "jettison" by "dispense with".
   - End the sentence where the colon now appears and put the material
   after it into a new sentence.
   - Replace "these" by "this form of access is"
   - Replace "faster to access" by "provides faster access"
   - Replace "readily accessible by any application" by "is readily
   accessible by applications".

*File system Support:*

In the first sentence of the second paragraph, suggest adding a comma after
"file systems".

*Namespaces:*

Suggest replacing the second paragraph by the following:

This document only provides for namespaces supported user-managed
metadata only, thus avoiding the need to specify the semantics
applicable particular system-interpreted xattrs.

The values of xattrs are considered application data just as the
contents of named attributes, files, and symbolic links are.  Servers
have a responsibility to store whatever value the client specifies and
to return it on demand.

xattr keys and values MUST not be interpreted by the NFS clients and
servers, as such behavior would lead to non-interoperable
implementations.  If there is a need to specify attributes that
servers need to be act upon, the appropriate semantics need to be
specified by adding a new attribute for the purpose as provided by
[RFC5661] and [draft-ietf-nfsv4-versioning].

I know that I promised to somehow "toughen up" the language. I was unable
to do that. Given that the original already used "MUST", there was no real
place to go while still staying within the scope of RFC2119. In any case, I
hope the above moves things in the right direction

  *Differences with named Attributes:*

Suggest, in the title, replacing "with" by "from".

In the first paragraph, the appropriate reference for the definition of
named attributes should be to  RFC7530.

In the first sentence of the second paragraph, suggest replacing "define
individual xattrs 'get' and 'set' operations" by "operations to get and set
indivdual xatrrs".

*Protocol Enhancements:*

Suggest, in the title, replacing "enhancements" by "extensions".

In the second sentence, suggest deleting "to bitmap4 data type.

In the fourth sentence, suggest replacing "new operations, namely" by "the
new operations".

Also in the fourth sentence suggest replacing "xattr key/value" by "xattr
keys and values".

Suggest deleting the third sentence and adding a new second paragraph,
along the lines of the following:

These changes follow applicable guidelines for valid NFSv4 protocol
extension, whether the extensions occur in a minor version (as
specified in [2]) or as an extension to an existing minor version (as
specified in [draft-ietf-nfsv4-versioning]).

I'm thinking that the reference to the versioning doc would be
informational for now but could eventually be made normative, most likely
after that document is submitted to the IESG but before approval.

I note that you specify an attribute number and values
for certain flags/value but do not specify opcodes for your new
operations.  What you might want to do to address that issue is to remove
all numerical assignments from where they are now and put them all into a
new section 6.x, entitled something like "New values associated with
protocol extensions".  Having those in one place would facilitate the
process of approving this document as a working group document assumng we
follow the procedures now described in draft-ietf-nfsv4-versioning-01.

*New Attributes:*

In the first sentence suggest adding "per-fs read-only" before "attribute".

Also in the first sentence suggest deleting "with GETATTR".

*Attribute 82: xattr_support:*

You might want to:

   - Change the title to "xattr_support attribute"
   - In the table replace "82" by "--".

Suggest adding a new paragraph after the current first one, as follows:

Since xattr_support is not a REQUIRED attribute, server need not support
it.  However, a client may reasonably assume that a server (or fs) that
does not support the xattr_support attribute does not provide xattr support
and act on that basis.

*New operations:*

Suggest replacing the first two sentences by the following:

Individual xattrs generally represent separate items of metadata.  For
various reasons, combining them into single attribute results in
clumsy implementations which contain significant functional deficits.
In consequence, adding a new attribute to represent the set of xattrs
for an object is not an appropriate way to provide support for xattrs.

Suggest replacing the last sentence of the first paragraph by the following:

Such a read-modify-write cycle is subject to updates being lost in the case
of simultaneous updates by multiple clients.  In addition, two clients
might simultaneously add the same xattr key to the same file with each
concluding that it did the inital creation for the common xattr key, when
the semantic model implies that only one could have done so.

You need a paragraph to deal with interactions between xattr and stateful
operations. Please look at the following attempt and see if it needs any
changes:

Xattr operations operate, for the most part, separate from operations
related to locking state. Xattrs can be interrogated and modified without a
corresponding open file. An open denying write or read does not prevent
access to or modification of xattrs. Only in the case of delegations is
there an interaction with the state logic. Xattrs cannot be modified when a
delegation for the corresponding file is held by another client. On the
other hand, xattrs can be interrogated despite the holding of a write
delegation by another client.

There are a number of issues that arise repeatedly in the subsections of
section 6 but are not specifically mentioned below:

   - In many cases, the word "MUST" is used in contexts it would not be
   used in corresponding description of READ and WRITE, for example.
   - The indenting of the titles of sections named "ARGUMENTS" seems wrong
   and could be fixed.

*New Definitions:*

The first sentence of the second paragraph consists of two independent
clauses joined by a comma.  To address that and also to simplify
capitalization issues, I suggest rewriting it as follows:

An xattr4 consists of an xattrname4 which is a UTF-8 string denoting
the xattr key name and an attrvalue4 which is a variable-length string
that identifies the value of the xattr.

I don't see the point of the third sentence of the second paragraph. The
concept of the combined size of an xattr does not seem to be used anywhere
else. I'd suggest deleting this sentence.

In the fourth sentence of the second paragraph, I'd suggest replacing
"array of xattr4" by "set of extended attributes".

There are a number of issues with the last sentence of the second paragraph
that should be considered:

   - If you do have separate ACE bit for getting and setting xattrs, then
   ACCESS and OPEN will give you no useful information as to access.
   - ACCESS is the operation designed to determine whether access is
   permissible. If OPEN does allow you to infer permission that can be
   mentioned but it should not be on the same level as open.

There are some issues that relate to internationalization that need to be
addressed. While you could (implicitly) inherit the treatment of file names
specified in RFC7530, there are a number of considerations that argue for
something different:

   - The fact that the strings are defined as capitalization-insensitive
   means that the string cannot be anything other than UTF-8, as opposed to
   the case of file names in which UTF-8 is merely the preferred encoding.
   - You may be closer to a clean slate in having fewer internationalized
   strings to deal with.

This leads to a number of potential issues that you may have to deal with
eventually:

   - Given that this data has to be UTF8, we face the issue of mandating
   checking for valid UTF8 strings, either as a "MUST" or a "SHOULD". For file
   names, this is a "MAY".
   - The fact that capitalization is inherently language-specific, even
   though the practical effect of this fact may be limited in the context in
   which you are dealing (i.e. you may have few or no Turkish or Azeri xattr
   names to deal with). In any case, you'll eventually need some specification
   language to deal with this issue.
   - The fact that some OS's don't like to do normalization-related
   processing in the kernel raises some issues. Given that we are in a
   UTF8-only environment may mean that we may no longer be able to simply
   ignore normalization issues as is now allowed for file names. That may be
   something the IESG is unwilling to accept. If we can't depend on the server
   to convert to a preferred normalization form, we may have to mandate that
   the client provides xattr names in the preferred normalization form. If the
   client could require the same of the applications, it can avoid having to
   do normalization itself. You might have to dance around the issue of
   verifying correct normalization. Sigh!

*Caching:*

In the first sentence of the second paragraph,, suggest replacing "an
operation" by "some operations".

The way the third paragraph is written is confusing.  I suggest separating
the statements about synchronously doing modifications from those about
caching per se.  The result would be something like the following:

All modifications to xattrs should be done by requests to the server, since
the protocol has no support for writeback caching of of xattrs.  The server
should perform such updates synchronously.

Xattrs obtained from the server and xattrs sent to the server may be
cached and clients can use them to avoid subsequent GETXATTR requests,
provided that the client ensure that the cached value ha not been
subsequently modified by another client.  Such assurance can depend on
the client holding a delegation for the file in question or the client
can interrogate the change time, to make sure that any cached value is
still valid.  Such caching may be read-only or writethrough.

I think that speaking of "incoherency" give the wrong impression.  I
suggest rewriting the last paragraph as follows:

The result of local caching is that the individual xattrs maintained
on clients may not be up-to-date. Changes made in one order on the
server may be seen in a different order on one client and in a third
order on another client. In order to limit problems that might arise
because by separate operations to obtain individual xattrs and other
file attributes, a client should treat xattrs just like other file
attributes with respect to caching as detailed in section 10.6 of RFC
<https://tools.ietf.org/html/rfc5661> 5661
<https://tools.ietf.org/html/rfc5661> [2
<https://tools.ietf.org/html/draft-naik-nfsv4-xattrs-02#ref-2>]. A
client may validate its cached version of an xattr for a file by
fetching the change attribute and assuming that if the change
attribute has the same value as it did when the attribute was cached,
then the xattr has not changed.  If the client holds a delegation that
ensures that the change attribute cannot be modified, that it can
dispense with actual interrogation of the change attribute.

GETXATTR - Get an extended attribute of a file

As currently written the first and third sentence of the second
paragraph of DESCRIPTION are contradictory in that the first is not
conditional on being able to do the operation while third makes due
allowance for failure conditions.  Suggest replacing, in the first
sentence "MUST obtain" by "wiil fetch".

In the last sentence of that paragraph, suggest replacing "will exceed
the channel's negotiated maximum response size" by "is such as to
cause the channel's negotiated maximum response size to be exceeded".

The IMPLEMENTATION section is confusing in that it jams client and
server considerations together.  It would be better to start with the
client and proceed like the following:

Clients which have a cached xattr value may avoid the need to do a
GETXATTR by determining if the change attribute is the same as it was
when the xattr was fetched.  If the client does not hold a delegation
for the file in question it can do this by do a GETATTR fetching the
change attribute and comparing the value to a change attribute value
fetched when the xattr value was obtained. This handling is similar to
how a client would revalidate other file attributes such as ACLs.

When responding to such a GETATTR, the server will, if there is an
OPEN_DELEGATE_WRITE delegation held by another client for the file in
question, either obtain the actual current value of these attributes
from the client holding the delegation by using the CB_GETATTR
callback, or revoke the delegation. See Section 18.7.4 of RFC 5661
<https://tools.ietf.org/html/rfc5661#section-18.7.4> for details [2
<https://tools.ietf.org/html/draft-naik-nfsv4-xattrs-02#ref-2>].

SETXATTR - Set an extended attribute of a file

As this is written now, handling the conditional create case (I.e.
create the attribute if it does not currently exist) is unduly
difficult. One is forced to retry after an error and there is no
guarantee that the situation has not changed in the meantime.  Some
ways of addressing this are:

   - Adding a new value (e.g. SETXATTR4_CONDCR) to setxattr4_type for
the conditional create case.
   - Getting rid of setaxattr4_type, making the server always doing a
conditional create, and adding a boolean to the response indicating
whether the xattr existed before the setxattr was done.

I'm also proposing that you add a changetime value to the NFS4_OK case
of SETXATTR4res.  doing a GETATTR before the SETXATTR provides a
useless value while doing a gETATTR after the SETXATTR leaves a race
open in which you can wind up consideriing an out-of-date xattr value
as valid.

Which regard to the second paragraph of DESCRIPTION:

   - In the first sentence, suggest replacing "If the xattr key and/or
value contained in the client request exceeds" by "If the xattr and
value contained in the client request are such that the request would
exceed".
   - In the second sentence, suggest you pick another error since
NFS4ERR_ENOSPC would most likely indicate you are out of disk space.

The two sentences of the third paragraph of DESCRIPTION disagree
regarding the case in which you do a SETXATTR that sets the xattr
value to what it currently is.  Suggest the following as a
replacement:

A successful SETXATTR MUST change the file time_modify and change
attributes if the xattr is created or the value assigned to xattr is
actually changes. However, these attributes SHOULD NOT be changed in
case in which SETXATTR Cause no actual change in the xattr value.

*LISTXATTR - List extended attributes of a file:*

The struct LISTXATTR4args is missing the definition of la_cookieverf.

REMOVEXATTR - Remove an extended attribute of a file:

As with SETXATTR, I believe you should return a change time in the response.

With regard to the second paragraph of DESCRIPTION:

   - Suggest replacing "SHOULD" by "MUST".
   - Suggest deleting the second sentence.

*Valid Errors:*

This does not address the issues with NFS4ERR_ENOSPC mentioned elsewhere.

With regard to GETXATTR:

   - Don't see why NFS4ERR_GRACE is included.
   - Believe NFS4ERR_{IS,NOT}DIR should be deleted.

With regard to SETXATTR:

   - Believe NFS4ERR_ADMIN_REVOKED should be deleted.
   - Believe NFS4ERR_ATTRNOTSUPP should be deleted.
   - Believe NFS4ERR_BADOWNER should be deleted.
   - Believe NFS4ERR_BAD_RANGE should be deleted.
   - Believe NFS4ERR_BAD_STATEID  should be deleted.
   - Believe NFS4ERR_DELEG_REVOKED should be deleted.
   - Believe NFS4ERR_EXPIRED should be deleted.
   - Believe NFS4ERR_FBIG should be deleted.
   - Don't see why NFS4ERR_GRACE is included.
   - Believe NFS4ERR_LOCKED should be deleted.
   - Believe NFS4ERR_NOTDIR should be deleted.
   - Believe NFS4ERR_OLD_STATEID should be deleted.
   - Believe NFS4ERR_OPENMODE should be deleted.
   - Believe NFS4ERR_UNKNOWN_LAYOUTTYPE should be deleted.

With regard to LISTXATTR:

   - Believe NFS4ERR_ADMIN_REVOKED should be deleted.
   - NFS4ERR_FHEXPIRED is not a valid error.
   - Don't see why NFS4ERR_GRACE is included.
   - Believe NFS4ERR_LOCKED should be deleted.
   - Believe NFS4ERR_{IS,NOT}DIR should be deleted.

With regard to REMOVEXATTR:

   - Believe NFS4ERR_ADMIN_REVOKED should be deleted.
   - Believe NFS4ERR_ATTRNOTSUPP should be deleted.
   - Believe NFS4ERR_BADOWNER should be deleted.
   - Believe NFS4ERR_BAD_RANGE should be deleted.
   - Believe NFS4ERR_BAD_STATEID  should be deleted.
   - Believe NFS4ERR_DELEG_REVOKED should be deleted.
   - NFS4ERR_FHEXPIRED is not a valid error.
   - Believe NFS4ERR_EXPIRED should be deleted.
   - Don't see why NFS4ERR_GRACE is included.
   - Believe NFS4ERR_NOTDIR should be deleted.
   - Believe NFS4ERR_UNKNOWN_LAYOUTTYPE should be deleted

Extensions to ACE Access Mask Attributes:

You might want to:

   - Delete the definition of the two new values and only indicate
that new values are defined.
   - Indicate that the actual value will appears in the new section 6.x.

I don't understand the statement "No additional granularity of control
is implied by these constants for server implementations".
Specifically,

   - The previous sentence, in indicating how these are used, does
imply a finer-grained access control arrangement.
   - If there were not finer-grained access control, there would be no
point in defining these additional bits

*New Section 6.x:*

The section title should be something like "Numeric values assigned".

The initial paragraph should be something like the following:

This section lists the numeric values assigned to implement the xattr
feature. To avoid inconsistent assignments, they have been checked against
the most recent minor version and all extensions currently approved as
working group documents. Given that, development of interoperable
prototypes should be possible using these value, although the possibility
exists that these assignments may be modified before eventual publication
as a standard-track document.

After that, I would list the necessary assignments in XDR-style format with
comments indicating where each XDR section would by placed in a
consolidated XDR for the protocol including the extension.

*pNFS Considerations:*

Would revise to be more consistent with the fact that xattrs are more
likely to be on the metadata server itself and not data servers aka data
storage devices. Something like:

All xattr operations are sent to the metadata server, which is
responsible for fetching data from and effecting necessary changes to
persistent storage.

*Security Considerations:*

If you are going to reference any previous NFSv4 protocol version, it
should be NFSv4.2.

I think it may make sense to say here that the issues are exactly the same
as those relating to the storing of file data and named attributes.  These
are all various sorts of application data and the fact that the means of
reference is slightly different in each case should not be considered
security-relevant.

*IANA Considerations:*

A better formulation would be:

This document does not require any actions by IANA.

The IESG may raise the issue of the existing IANA maintained registry of
named attributes. If you don't think one is required, you may may to
explain why this situation is different. In any case, you should refer to
the description in RFC7530 as the one in RFC5661 is not correct (may need
an errata for that sometime).

*References:*

I'm pretty sure you need a reference to RFC7530 and I tend to think it
should be normative.

I think you need to have a reference to the current NFSv4.2 draft. If this
becomes a working group document before the v4.2 RFC is out, you will need
to add a note asking the RFC Editor to make sure that the eventual RFC
number is inserted.

---

From: [email-masked] (J. Bruce Fields)
Date: Wed, 29 Jul 2015 13:52:19 -0400

>    - The fact that the strings are defined as capitalization-insensitive

They're just null-terminated C strings on Linux, as far as I know.

On the client side, maybe this wouldn't cause any problem, *if* we're
lucky and no applications have ever used both "user.a" and "user.A"
xattrs.

On the server side I doubt any of the major filesystems implement
case-insensitive xattr names.

I don't know what the situation is with other OS's.  (I haven't checked
carefully even on Linux, somebody correct me if I've got something
wrong.)

--b.

---

From: [email-masked] (J. Bruce Fields)
Date: Wed, 29 Jul 2015 14:12:46 -0400

> open in which you can wind up consideriing an out-of-date xattr value

You also need an atomic pre-op changeattr, don't you?  (Otherwise you
could miss concurrent modification of an unrelated xattr on the same
file.)

(And what makes SETXATTR special, as opposed to WRITE, CREATE, RENAME,
etc.?  And why did this stuff get dropped between NFSv3 and NFSv4,
anyway?)

--b.

---

From: [email-masked] (J. Bruce Fields)
Date: Wed, 29 Jul 2015 14:22:39 -0400

> ways of addressing this are:

It looks like a copy of the linux setxattr() interface which just
accidentally left out the default (conditional create) case:

	http://linux.die.net/man/2/setxattr

> the conditional create case.

So this would do the job.

--b.

---

From: David Noveck <[email-masked]>
Date: Wed, 29 Jul 2015 15:53:40 -0400

> They're just null-terminated C strings on Linux, as far as I know.

If they're not capitalization-insensitive, that would make things a lot
simpler.

That would mean that we could use the same approach to internationalization
that
the IESG approved for RFC7530.

Of course we have to do something to make clear this approach applies to
NFSv4.1 and v4.2 as well, and that the stuff about internationalization in
RFC5661 is best ignored.

Actually, people have been ignoring that stuff successfully for quite a
while.

> You also need an atomic pre-op changeattr, don't you?

That's desirable but I don't see that it is necessary.

> (Otherwise you

As I understand things, the situation would be the reverse.  If you fetched
xattr A
with change C1 and then set xattr B with change C2, you'd miss the fact
that xattr A
was not changed.  When you verified your cached value of xattr A you'd see
that the
change was not C1 and you'd do an extra GETXATTR.

> etc.?

In this case it was because it was new and what was proposed in the
document didn't
seem to me that it would work without this change.

If you think those others are important you could propose WRITE_PLUS,
CREATE_PLUS,
RENAME_PLUS as optional features.

> And why did this stuff get dropped between NFSv3 and NFSv4, anyway?)

I don't know.  I think this happened before I had anything to do with
NFSv4.  Anyway, that's
my story and I'm sticking to it.

My impression is that people figured that COMPOUND meant you didn't need
it, forgetting
about the atomicity issue.  Another consideration was that, in the case of
writes, very few people
were able to deal with the fact that when multiple writes were in-flight at
the same time
you might process the responses in a different order than the writes were
processed.  In any case,
nobody raised the alarm about this, in time to change it for RFC3530, or
for RFC5661 (given that
v4.1 was essentially a new protocol.

---

From: Nico Williams <[email-masked]>
Date: Wed, 29 Jul 2015 17:56:21 -0500

>    - The fact that the strings are defined as capitalization-insensitive

Where does it say that?

>    the case of file names in which UTF-8 is merely the preferred encoding.

Near as I can tell xattrs are case-sensitive.  Sure, I've seen this:

https://issues.apache.org/jira/browse/HDFS-6413

but the takeaway is that they are case-sensitive, not insensitive.

It's quite difficult to implement case-insensitive behavior in a
filesystem, so it's quite natural to just not do it, to implement
memcmp-alike matching only.

>    checking for valid UTF8 strings, either as a "MUST" or a "SHOULD". For file

I continue to insist that this is the wrong approach.

On the server/filesystem driver side names should be byte-arrays that
*when they can be interpreted as UTF-8* might be matched normalization-
insenstively, otherwise it's as good as memcmp() semantics.

*Clients* SHOULD use UTF-8.

Anything else is make-believe wishful thinking.  We can certainly have
RFCs that reflect what the consensus is, but if the consensus does not
reflect reality and reality cannot be bent to reflect the consensus,
then it does no one any good.

>    language to deal with this issue.

Yes.  Can't please everyone in the kernel and it's inefficient to try to
anywhere else.  We can't even tag strings with locales because the users
seeing them might be in different locales.

>    processing in the kernel raises some issues. Given that we are in a

But at least this is tractable and doable (and done!), unlike
case-insensitivity.

>    ignore normalization issues as is now allowed for file names. That may be

xattr names are exactly like file names as far as I18N goes (minus the
option to be case-insensitive).  What goes for file names, should go for
xattr names.  This I-D should not be required to do anything special.

>    something the IESG is unwilling to accept. If we can't depend on the server

The only way to find what the IESG is willing to accept is to send them
an I-D for publication.  We should never ever be in the business of
second-guessing them without a clear precedent to look at.

>    [...]

Servers can be normalization-insensitive without normalizing on create.
If a filesystem hashes directory entries then it has to normalize to/as
is hashes, but it can still preserve the original form.  There is an
existence proof of this, of course.

Nico
--

---

From: Nico Williams <[email-masked]>
Date: Wed, 29 Jul 2015 19:07:44 -0500

> *Clients* SHOULD use UTF-8.

By that I really meant: that part of clients who know what locale is
being used.  Generally this is not the component of the system that
produces and sends NFSv4 RPCs.  Eliding that for this discussion was
fine, but more generally for an NFSv4 RFC the same observation I've made
endlessly about servers applies to clients: the NFSv4 protocol-speaking
components sadly are in no position to do too much about I18N.

---

From: Christoph Hellwig <[email-masked]>
Date: Thu, 30 Jul 2015 08:36:05 +0200

> but the takeaway is that they are case-sensitive, not insensitive.

Unfortuntely HFS+ xattrs are by default case insensitiv, although they
will be case sensitive if the filesystem has the case sensitive bit set.

But I'm more than happy to declare this a corner case, and anyone wanting
to export HFS+ xattrs over NFS in a spec compliant way needs to set the
case sensitive bit.

> then it does no one any good.

Agreed.  I think the main mistake is to even allow case insensitive
file names in the spec rather than handling them as non-comliant corner cases
as in v3 and earlier.  But that damage has been done..

---

From: David Noveck <[email-masked]>
Date: Thu, 30 Jul 2015 09:34:35 -0400

> Where does it say that?

In draft-naik-xattrs-02, it says "typedef utf8str_cis xattrname4".  If this
is
just wrong, then we can fix it and things are a lot simpler.

> an I-D for publication.

Doing that has a higher overhead than I would like.

> We should never ever be in the business of

Unfortunately, we often have to do our best to interpret unclear precedents.

> existence proof of this, of course.

And it's specifically allowed by RFC7530.

---

From: "J. Bruce Fields" <[email-masked]>
Date: Thu, 30 Jul 2015 11:33:44 -0400

> change was not C1 and you'd do an extra GETXATTR.

So, a careful client:

	- without any atomic pre- or post-op attributes, would throw out
	  its entire xattr cache for that file on SETXATTR.
	- with only a post-op attribute, could continue caching the
	  specific xattr written but would throw out the others.
	- with pre- and post- op attributes, could continue caching any
	  xattrs for the file.

OK.

--b.

---

From: David Noveck <[email-masked]>
Date: Thu, 30 Jul 2015 13:10:32 -0400

So a pre-op attribute is not a REQUIREMENT but it is an AWFULLY GOOD IDEA.

---

From: "J. Bruce Fields" <[email-masked]>
Date: Thu, 30 Jul 2015 13:36:55 -0400

> So a pre-op attribute is not a REQUIREMENT but it is an AWFULLY GOOD IDEA.

How has the ietf made it this far without that key word?

--b.

> _______________________________________________
> nfsv4 mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/nfsv4

---

From: Tom Talpey <[email-masked]>
Date: Thu, 30 Jul 2015 17:40:30 +0000

> -----Original Message-----
> From: nfsv4 [mailto:[email-masked]] On Behalf Of J. Bruce Fields
> Sent: Thursday, July 30, 2015 1:37 PM
> To: David Noveck <[email-masked]>
> Cc: [email-masked]
> Subject: Re: [nfsv4] review of draft-naik-xattrs-02
> 

I know it's tongue in cheek, but the keyword is "RECOMMENDED".

RFC2119:

3. SHOULD  
 This word, or the adjective "RECOMMENDED", mean that there
   may exist valid reasons in particular circumstances to ignore a
   particular item, but the full implications must be understood and
   carefully weighed before choosing a different course.

---

From: "Manoj Naik" <[email-masked]>
Date: Fri, 31 Jul 2015 08:30:08 -0700

David Noveck <[email-masked]> wrote on 07/30/2015 06:34:35 AM:

> From: David Noveck <[email-masked]>
> To: Nico Williams <[email-masked]>
> Cc: Manoj Naik/Almaden/IBM@IBMUS, Marc Eshel/Almaden/IBM@IBMUS, 
> "[email-masked]" <[email-masked]>
> Date: 07/30/2015 06:37 AM
> In draft-naik-xattrs-02, it says "typedef utf8str_cis xattrname4".  If 
this is
> just wrong, then we can fix it and things are a lot simpler.

Based on the comments so far, I will change this to utf8str_cs.

Manoj.