<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.26 (Ruby 2.6.10) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-haynes-nfsv4-uncacheable-02" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.28.0 -->
  <front>
    <title abbrev="Uncacheable Attribute">Adding an Uncacheable Attribute to NFSv4.2</title>
    <seriesInfo name="Internet-Draft" value="draft-haynes-nfsv4-uncacheable-02"/>
    <author initials="T." surname="Haynes" fullname="Thomas Haynes">
      <organization>Hammerspace</organization>
      <address>
        <email>loghyr@gmail.com</email>
      </address>
    </author>
    <date/>
    <area>General</area>
    <workgroup>Network File System Version 4</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 34?>

<t>The Network File System version 4.2 (NFSv4.2) allows a client to
cache both metadata and data for file objects, as well as metadata
for directory objects.  While caching directory entries (dirents) can
improve performance, it can also prevent the server from enforcing access
control on individual dirents.  Similarly, caching file data can lead to
performance issues if the cache hit rate is low.  This document introduces
a new uncacheable attribute for NFSv4.  Files and dirents marked as
uncacheable MUST NOT be stored in client-side caches.
This ensures data consistency and integrity by requiring clients to
always retrieve the most recent data directly from the server. This
document extends NFSv4.2 (see RFC7862).</t>
    </abstract>
    <note>
      <name>Note to Readers</name>
      <?line 48?>

<t>Discussion of this draft takes place
on the NFSv4 working group mailing list (nfsv4@ietf.org),
which is archived at
<eref target="https://mailarchive.ietf.org/arch/search/?email_list=nfsv4"/>. Source
code and issues list for this draft can be found at
<eref target="https://github.com/ietf-wg-nfsv4/uncacheable"/>.</t>
      <t>Working Group information can be found at <eref target="https://github.com/ietf-wg-nfsv4"/>.</t>
    </note>
  </front>
  <middle>
    <?line 59?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>In the Network File System version 4.2 (NFSv4.2) <xref target="RFC7863"/>, a client
queries for either a file's or directory's attributes via either GETATTR
<xref section="18.7" sectionFormat="of" target="RFC8881"/> or READDIR <xref section="18.23" sectionFormat="of" target="RFC8881"/>
to the server. These directory entries (dirents) can be cached locally
by the client.</t>
      <t>Since cached dirents are shared by all users on a client, and the
client cannot determine access permissions for individual dirents, all
users are presented with the same set of attributes. To address this,
this document introduces the new uncacheable attribute. This attribute
instructs the client not to cache the dirent for a file or directory
object. Consequently, each time a client queries for these attributes,
the server's response can be tailored to the specific user making
the request, based on factors such as Access Control Lists (ACLs) on
the file or directory object <xref section="6" sectionFormat="of" target="RFC8881"/>
or proprietary policies.</t>
      <t>In addition to caching metadata, clients can also cache file data. The
uncacheable attribute also instructs the client to bypass its page cache
for the file. This behavior is similar to using the O_DIRECT flag with
the open call. This can be beneficial for files that are not shared or
for files that do not exhibit access patterns suitable for caching.</t>
      <t>Using the process detailed in <xref target="RFC8178"/>, the revisions in this document
become an extension of NFSv4.2 <xref target="RFC7862"/>. They are built on top of the
external data representation (XDR) <xref target="RFC4506"/> generated from <xref target="RFC7863"/>.</t>
      <section anchor="definitions">
        <name>Definitions</name>
        <dl>
          <dt>Access Based Enumeration</dt>
          <dd>
            <t>When servicing a READDIR or GETATTR operation, the server provides
results based on the access permissions of the user making the request.</t>
          </dd>
          <dt>dirent</dt>
          <dd>
            <t>A directory entry, representing either a file or a subdirectory. In
the context of NFSv4, a dirent marked as uncacheable MUST NOT be cached
by clients.</t>
          </dd>
        </dl>
      </section>
      <section anchor="requirements-language">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/>
when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>
    <section anchor="sec_dirents">
      <name>Uncacheable Dirents</name>
      <t>If a file object or directory has the uncacheable attribute set,
then the client MUST NOT cache its dirent attributes. This means
that even if the client has previously retrieved the attributes
for a user, it MUST query the server again for those attributes
on subsequent requests. Additionally, the client MUST NOT share
attributes between different users.</t>
    </section>
    <section anchor="sec_files">
      <name>Uncacheable Files</name>
      <t>If a file object is marked as uncacheable, all modifications to
the file MUST be immediately sent from the client to the server. In
other words, the file data is also not cacheable.</t>
    </section>
    <section anchor="xdr-for-offline-attribute">
      <name>XDR for Offline Attribute</name>
      <sourcecode type="xdr"><![CDATA[
///
/// typedef bool            fattr4_uncacheable;
///
/// const FATTR4_UNCACHEABLE            = 87;
///
]]></sourcecode>
    </section>
    <section anchor="extraction-of-xdr">
      <name>Extraction of XDR</name>
      <t>This document contains the external data representation (XDR)
<xref target="RFC4506"/> description of the uncacheable attribute.  The XDR
description is presented in a manner that facilitates easy extraction
into a ready-to-compile format. To extract the machine-readable XDR
description, use the following shell script:</t>
      <sourcecode type="shell"><![CDATA[
#!/bin/sh
grep '^ *///' $* | sed 's?^ */// ??' | sed 's?^ *///$??'
]]></sourcecode>
      <t>For example, if the script is named 'extract.sh' and this document is
named 'spec.txt', execute the following command:</t>
      <sourcecode type="shell"><![CDATA[
sh extract.sh < spec.txt > uncacheable_prot.x
]]></sourcecode>
      <t>This script removes leading blank spaces and the sentinel sequence '///'
from each line. XDR descriptions with the sentinel sequence are embedded
throughout the document.</t>
      <t>Note that the XDR code contained in this document depends on types from
the NFSv4.2 nfs4_prot.x file (generated from <xref target="RFC7863"/>).  This includes
both nfs types that end with a 4, such as offset4, length4, etc., as
well as more generic types such as uint32_t and uint64_t.</t>
      <t>While the XDR can be appended to that from <xref target="RFC7863"/>, the code snippets
should be placed in their appropriate sections within the existing XDR.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Clients MUST NOT make access decisions for uncacheable dirents. These
decisions MUST be made by the server. The uncacheable attribute allows
dirents to be annotated such that attributes are presented to the user
based on the server's access control decisions.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC4506">
        <front>
          <title>XDR: External Data Representation Standard</title>
          <author fullname="M. Eisler" initials="M." role="editor" surname="Eisler"/>
          <date month="May" year="2006"/>
          <abstract>
            <t>This document describes the External Data Representation Standard (XDR) protocol as it is currently deployed and accepted. This document obsoletes RFC 1832. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="67"/>
        <seriesInfo name="RFC" value="4506"/>
        <seriesInfo name="DOI" value="10.17487/RFC4506"/>
      </reference>
      <reference anchor="RFC7862">
        <front>
          <title>Network File System (NFS) Version 4 Minor Version 2 Protocol</title>
          <author fullname="T. Haynes" initials="T." surname="Haynes"/>
          <date month="November" year="2016"/>
          <abstract>
            <t>This document describes NFS version 4 minor version 2; it describes the protocol extensions made from NFS version 4 minor version 1. Major extensions introduced in NFS version 4 minor version 2 include the following: Server-Side Copy, Application Input/Output (I/O) Advise, Space Reservations, Sparse Files, Application Data Blocks, and Labeled NFS.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7862"/>
        <seriesInfo name="DOI" value="10.17487/RFC7862"/>
      </reference>
      <reference anchor="RFC7863">
        <front>
          <title>Network File System (NFS) Version 4 Minor Version 2 External Data Representation Standard (XDR) Description</title>
          <author fullname="T. Haynes" initials="T." surname="Haynes"/>
          <date month="November" year="2016"/>
          <abstract>
            <t>This document provides the External Data Representation (XDR) description for NFS version 4 minor version 2.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7863"/>
        <seriesInfo name="DOI" value="10.17487/RFC7863"/>
      </reference>
      <reference anchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
      <reference anchor="RFC8178">
        <front>
          <title>Rules for NFSv4 Extensions and Minor Versions</title>
          <author fullname="D. Noveck" initials="D." surname="Noveck"/>
          <date month="July" year="2017"/>
          <abstract>
            <t>This document describes the rules relating to the extension of the NFSv4 family of protocols. It covers the creation of minor versions, the addition of optional features to existing minor versions, and the correction of flaws in features already published as Proposed Standards. The rules relating to the construction of minor versions and the interaction of minor version implementations that appear in this document supersede the minor versioning rules in RFC 5661 and other RFCs defining minor versions.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8178"/>
        <seriesInfo name="DOI" value="10.17487/RFC8178"/>
      </reference>
      <reference anchor="RFC8881">
        <front>
          <title>Network File System (NFS) Version 4 Minor Version 1 Protocol</title>
          <author fullname="D. Noveck" initials="D." role="editor" surname="Noveck"/>
          <author fullname="C. Lever" initials="C." surname="Lever"/>
          <date month="August" year="2020"/>
          <abstract>
            <t>This document describes the Network File System (NFS) version 4 minor version 1, including features retained from the base protocol (NFS version 4 minor version 0, which is specified in RFC 7530) and protocol extensions made subsequently. The later minor version has no dependencies on NFS version 4 minor version 0, and is considered a separate protocol.</t>
            <t>This document obsoletes RFC 5661. It substantially revises the treatment of features relating to multi-server namespace, superseding the description of those features appearing in RFC 5661.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8881"/>
        <seriesInfo name="DOI" value="10.17487/RFC8881"/>
      </reference>
    </references>
    <?line 182?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Trond Myklebust and Thomas Haynes all worked on the prototype at Hammerspace.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAM382WcAA41YbVPkNhL+rl+hsKkCUjPDwnK7ZO5ym1lgX6pYyMFwuatU
jpJtzVjBYzmWDMxx7G+/p1uyxwNsJVuV4LGlVr8+T7eGw6Hwxhd6LCdZZsq5
VKW8LFOV5lolhZYT72uTNF5Lb+Xp+4ub/dGeUElS65vx8wtFZtNSLSAxq9XM
D3O1LLUbljN3sz9sVjuGL/dEqrye23o5ls5nIsOvsbw/mkyPH0RqS6dL17ix
9HWjhalqfnJ+7+XL77FX1VqN5Qdd6loV4tbW1/PaNtVYnmpPv+R7A7Uuls7r
hfynrp2xpdwX13qJr9lYfiq9rkvth0ekphDOqzK7UoUtocRSO1GZsfzF23Qg
na19rWcOT8sFPfwqhGp8buuxkEMh8c+UUHQ6kh/ZWn4VnDDN7UK5/ntbz1Vp
/qs8FBrjw2IB5SqVav6qF8oUY1nYeb6sf5zTr1FqF0KUtl5gz43GmfL8/eHe
7u738XH/Ly9fx8c3B6/3Vo+v4uPB7pv91eNB+3hwsDsWwpSzlWgxHA6lSpyv
VQqnTHP9rD9vWn+O9uRWTIttqYrC3jqpZFoYXXqkjOBwy8T6XC60VwixQopl
kh9wrpyRVJv8plMP/8JTt7oo6G+7XNCqzNRYgExpl46k/DmnrXQA5e1qBU6u
jXZyi16V3m1jTSnMoqrtjZaVrtncMtUDaTx9g97OygopzUpDX6drWChntV1A
HNanXBppqp2jzPS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