Subject: [nfsv4] Hole Threshold?

From: Christoph Hellwig <[email-masked]>
Date: Tue, 29 Apr 2014 20:34:14 +0200

The NFSv4.2 spec defines a "Hole Threshold" in 6.2, but then only uses it
a single time in an example in 15.11.5.  Was it intended to expose the
hole treshold in an attribute?  If yes do we still need to add that
attribute, if not should the spec really define the term just for a single
example?

---

From: Tom Haynes <[email-masked]>
Date: Tue, 29 Apr 2014 11:58:09 -0700

On Apr 29, 2014, at 11:34 AM, Christoph Hellwig <[email-masked]> wrote:

> hole treshold in an attribute?

No, there is no way for the client to determine what this limit is.

Note that the Hole Threshold would be filesystem dependent.

>  If yes do we still need to add that

It helped in earlier discussions, but I’m open to changing it now.

How about:

KinSlayer:NFSv4.2 loghyr$ git diff
diff --git a/nfsv42_middle_op_read_plus.xml b/nfsv42_middle_op_read_plus.xml
index 55d6b1a..ae36d3e 100644
--- a/nfsv42_middle_op_read_plus.xml
+++ b/nfsv42_middle_op_read_plus.xml
@@ -167,7 +167,8 @@
     <t>
       The following table describes a sparse file.  For each byte
       range, the file contains either non-zero data or a hole. In addition,
-      the server in this example uses a Hole Threshold of 32K.
+      the server in this example will only create a hole if it is greater
+      than 32K.
     </t>
 
     <texttable anchor="space_example">
@@ -195,7 +196,7 @@
       <list style="numbers">
         <t>
           READ_PLUS(s, 0, 64K) --> NFS_OK, eof = false, &lt;data[0,32K], hole[32K,224K]&gt;.
-          Since the first hole is less than the server's Hole Threshold, the
+          Since the first hole is less than the server's minimum hole size, the
           first 32K of the file is returned as data and the remaining 32K is
           returned as a hole which actually extends to 256K.
         </t>
diff --git a/nfsv42_middle_sparse.xml b/nfsv42_middle_sparse.xml
index 346e273..419f078 100644
--- a/nfsv42_middle_sparse.xml
+++ b/nfsv42_middle_sparse.xml
@@ -84,13 +84,6 @@
           all zeroes.  A hole might or might not have space allocated
           or reserved to it.
         </t>
-
-        <t hangText='Hole Threshold:'>
-          The minimum length of a Hole as determined by the server.
-          If a server chooses to define a Hole Threshold, then it
-          would not return hole information about holes with a length
-          shorter than the Hole Threshold.
-        </t>
       </list>
     </t>
   </section>

---

From: Christoph Hellwig <[email-masked]>
Date: Wed, 30 Apr 2014 11:54:31 +0200

> Note that the Hole Threshold would be filesystem dependent.

Right.

Solaris exports this value using (f) pathconf with _PC_MIN_HOLE_SIZE,
which made me think you'd want something like this in the spec.  Linux
currently does not export the value, and at least for XFS the value
is dynamic and might be different for different files, and even change
for a given file dependin on its allocation pattern history.

> It helped in earlier discussions, but I’m open to changing it now.

Looks good to me.