draft-ietf-nfsv4-xattrs-05.txt | draft-ietf-nfsv4-xattrs-06.txt | |||
---|---|---|---|---|
NFSv4 Working Group M. Naik | NFSv4 Working Group M. Naik | |||
Internet Draft Nutanix | Internet Draft Nutanix | |||
Intended Status: Standards Track M. Eshel | Intended Status: Standards Track M. Eshel | |||
Expires: October 30, 2017 IBM Almaden | Expires: January 31, 2018 IBM Almaden | |||
April 28, 2017 | July 30, 2017 | |||
File System Extended Attributes in NFSv4 | File System Extended Attributes in NFSv4 | |||
draft-ietf-nfsv4-xattrs-05 | draft-ietf-nfsv4-xattrs-06 | |||
Abstract | Abstract | |||
This document describes an OPTIONAL feature extending the NFSv4 | This document describes an OPTIONAL feature extending the NFSv4 | |||
protocol which allows extended attributes (hereinafter also referred | protocol which allows extended attributes (hereinafter also referred | |||
to as xattrs) to be interrogated and manipulated using NFSv4 clients. | to as xattrs) to be interrogated and manipulated using NFSv4 clients. | |||
Xattrs are provided by a file system to associate opaque metadata, | Xattrs are provided by a file system to associate opaque metadata, | |||
not interpreted by the file system, with files and directories. Such | not interpreted by the file system, with files and directories. Such | |||
support is present in many modern local file systems. New file | support is present in many modern local file systems. New file | |||
attributes are provided to allow clients to query the server for | attributes are provided to allow clients to query the server for | |||
skipping to change at page 7, line 41 ¶ | skipping to change at page 7, line 41 ¶ | |||
6. Relationship with Named Attributes | 6. Relationship with Named Attributes | |||
[RFC7530] defines named attributes as opaque byte streams that are | [RFC7530] defines named attributes as opaque byte streams that are | |||
associated with a directory or file and referred to by a string name. | associated with a directory or file and referred to by a string name. | |||
Named attributes are intended to be used by client applications as a | Named attributes are intended to be used by client applications as a | |||
method to associate application-specific data with a regular file or | method to associate application-specific data with a regular file or | |||
directory. Although this makes xattrs similar in concept and use to | directory. Although this makes xattrs similar in concept and use to | |||
named attributes, there are important semantic differences. | named attributes, there are important semantic differences. | |||
File systems typically define operations to get and set individual | File systems typically define operations to get and set individual | |||
xatrrs as being atomic, although collectively they may be | xattrs as being atomic, although collectively they may be | |||
independent. Xattrs generally have size limits ranging from a few | independent. Xattrs generally have size limits ranging from a few | |||
bytes to several kilobytes; the maximum supported size is not | bytes to several kilobytes; the maximum supported size is not | |||
universally defined and is usually restricted by the file system. | universally defined and is usually restricted by the file system. | |||
Similar to ACLs, the amount of xattr data exchanged between the | Similar to ACLs, the amount of xattr data exchanged between the | |||
client and server for get/set operations can be considered to fit in | client and server for get/set operations can be considered to fit in | |||
a single COMPOUND request, bounded by the channel's negotiated | a single COMPOUND request, bounded by the channel's negotiated | |||
maximum size for requests. Named attributes, on the other hand, are | maximum size for requests. Named attributes, on the other hand, are | |||
unbounded data streams and do not impose atomicity requirements. | unbounded data streams and do not impose atomicity requirements. | |||
Individual named attributes are analogous to files, and are opened | Individual named attributes are analogous to files, and are opened | |||
skipping to change at page 10, line 33 ¶ | skipping to change at page 10, line 33 ¶ | |||
/// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | /// * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |||
/// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | /// * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |||
/// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | /// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |||
/// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | /// * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |||
/// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | /// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |||
/// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | /// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |||
/// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | /// * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |||
/// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | /// * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |||
/// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | /// * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
/// * | /// * | |||
/// * This code was derived from RFCTBD10. | /// * This code was derived from RFC 7863. | |||
/// * Please reproduce this note if possible. | /// * Please reproduce this note if possible. | |||
/// */ | /// */ | |||
<CODE ENDS> | <CODE ENDS> | |||
7.2. XDR for Xattr Extension | 7.2. XDR for Xattr Extension | |||
<CODE BEGINS> | <CODE BEGINS> | |||
/// /* | /// /* | |||
skipping to change at page 21, line 47 ¶ | skipping to change at page 21, line 47 ¶ | |||
<CODE BEGINS> | <CODE BEGINS> | |||
/// /* | /// /* | |||
/// * ACCESS - Check Access Rights | /// * ACCESS - Check Access Rights | |||
/// */ | /// */ | |||
/// const ACCESS4_XAREAD = 0x00000040; | /// const ACCESS4_XAREAD = 0x00000040; | |||
/// const ACCESS4_XAWRITE = 0x00000080; | /// const ACCESS4_XAWRITE = 0x00000080; | |||
/// const ACCESS4_XALIST = 0x00000100; | /// const ACCESS4_XALIST = 0x00000100; | |||
/// /* | /// /* | |||
/// * ACE mask values | ||||
/// */ | ||||
/// const ACE4_READ_XATTRS = 0x00200000; | ||||
/// const ACE4_WRITE_XATTRS = 0x00400000; | ||||
/// const ACE4_LIST_XATTRS = 0x00800000; | ||||
/// /* | ||||
/// * New NFSv4 attribute | /// * New NFSv4 attribute | |||
/// */ | /// */ | |||
/// typedef bool fattr4_xattr_support; | /// typedef bool fattr4_xattr_support; | |||
/// /* | /// /* | |||
/// * New RECOMMENDED Attribute | /// * New RECOMMENDED Attribute | |||
/// */ | /// */ | |||
/// const FATTR4_XATTR_SUPPORT = 81; | /// const FATTR4_XATTR_SUPPORT = 82; | |||
/// /* | /// /* | |||
/// * New NFSv4 operations | /// * New NFSv4 operations | |||
/// */ | /// */ | |||
/// /* Following lines are to be added to enum nfs_opnum4 */ | /// /* Following lines are to be added to enum nfs_opnum4 */ | |||
/// /* | /// /* | |||
/// OP_GETXATTR = 72, | /// OP_GETXATTR = 72, | |||
/// OP_SETXATTR = 73, | /// OP_SETXATTR = 73, | |||
/// OP_LISTXATTRS = 74, | /// OP_LISTXATTRS = 74, | |||
/// OP_REMOVEXATTR = 75, | /// OP_REMOVEXATTR = 75, | |||
skipping to change at page 24, line 23 ¶ | skipping to change at page 24, line 17 ¶ | |||
8.8. Xattrs and File Locking | 8.8. Xattrs and File Locking | |||
Xattr operations, for the most part, function independent of | Xattr operations, for the most part, function independent of | |||
operations related to file locking state. For example, xattrs can | operations related to file locking state. For example, xattrs can | |||
be interrogated and modified without a corresponding OPEN | be interrogated and modified without a corresponding OPEN | |||
operation. The server does not need to check for locks that | operation. The server does not need to check for locks that | |||
conflict with xattr access or modify operations. For example, | conflict with xattr access or modify operations. For example, | |||
another OPEN specified with OPEN4_SHARE_DENY_READ or | another OPEN specified with OPEN4_SHARE_DENY_READ or | |||
OPEN4_SHARE_DENY_BOTH does not prevent access to or modification | OPEN4_SHARE_DENY_BOTH does not prevent access to or modification | |||
of xattrs. Note that the server MUST still verify that the client | of xattrs. Note that the server MUST still verify that the client | |||
is allowed to perform the xattr operation on the basis of ACE | is allowed to perform the xattr operation on the basis of access | |||
access permissions. | permissions. | |||
However, the presence of delegations may dictate how xattr | However, the presence of delegations may dictate how xattr | |||
operations interact with the state-related logic. Xattrs cannot | operations interact with the state-related logic. Xattrs cannot | |||
be modified when a delegation for the corresponding file is held | be modified when a delegation for the corresponding file is held | |||
by another client. On the other hand, xattrs can be interrogated | by another client. On the other hand, xattrs can be interrogated | |||
despite the holding of a write delegation by another client since | despite the holding of a write delegation by another client since | |||
updates are write-through to the server. | updates are write-through to the server. | |||
8.9. pNFS Considerations | 8.9. pNFS Considerations | |||
All xattr operations are sent to the metadata server, which is | All xattr operations are sent to the metadata server, which is | |||
responsible for fetching data from and effecting necessary changes | responsible for fetching data from and effecting necessary changes | |||
to persistent storage. | to persistent storage. | |||
9. Security Considerations | 9. Security Considerations | |||
Since xattrs are application data, security issues are exactly the | Since xattrs are application data, security issues are exactly the | |||
same as those relating to the storing of file data and named | same as those relating to the storing of file data and named | |||
attributes. These are all various sorts of application data and | attributes. Clients MUST NOT accord any system-interpreted | |||
the fact that the means of reference is slightly different in each | semantics to xattrs, since their use is restricted to user-managed | |||
case should not be considered security-relevant. As such, the | metadata only as explained in Section 5. Extended attributes are | |||
additions to the NFS protocol for supporting extended attributes | various sorts of application data and the fact that the means of | |||
do not alter the security considerations of the NFSv4.2 protocol | reference is slightly different in each case should not be | |||
[RFC7862]. | considered security-relevant. As such, the additions to the NFS | |||
protocol for supporting extended attributes do not alter the | ||||
security considerations of the NFSv4 protocol [RFC7530]. | ||||
10. IANA Considerations | 10. IANA Considerations | |||
The addition of xattr support to the NFSv4 protocol does not | The addition of xattr support to the NFSv4 protocol does not | |||
require any actions by IANA. This document limits xattr names to | require any actions by IANA. This document limits xattr names to | |||
the user namespace, where application developers are allowed to | the user namespace, where application developers are allowed to | |||
define and use attributes as needed. Unlike named attributes, | define and use attributes as needed. Unlike named attributes, | |||
there is no namespace identifier associated with xattrs that may | there is no namespace identifier associated with xattrs that may | |||
require registration. | require registration. | |||
11. References | 11. References | |||
11.1. Normative References | 11.1. Normative References | |||
End of changes. 9 change blocks. | ||||
20 lines changed or deleted | 17 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |