xfsdocs: fix description of directory free block nvalid and nused header fields
The descriptions of the directory free block header's nvalid and nused
fields are backwards, so flip them. While we're fixing them, augment
the description to relate it to the rest of the directory structure.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
diff --git a/design/XFS_Filesystem_Structure/directories.asciidoc b/design/XFS_Filesystem_Structure/directories.asciidoc
index 06d682e..23645a7 100644
--- a/design/XFS_Filesystem_Structure/directories.asciidoc
+++ b/design/XFS_Filesystem_Structure/directories.asciidoc
@@ -1221,10 +1221,14 @@
The starting directory block number for the bests array.
*nvalid*::
-Number of elements in the bests array.
+Number of valid elements in the bests array. This number must
+correspond with the number of directory blocks can fit under the inode
++di_size+.
*nused*::
-Number of valid elements in the bests array.
+Number of used elements in the bests array. This number must correspond
+with the number of directory blocks actually mapped under the inode
++di_size+.
[source, c]
----
@@ -1262,10 +1266,14 @@
The starting directory block number for the bests array.
*nvalid*::
-Number of elements in the bests array.
+Number of valid elements in the bests array. This number must
+correspond with the number of directory blocks can fit under the inode
++di_size+.
*nused*::
-Number of valid elements in the bests array.
+Number of used elements in the bests array. This number must correspond
+with the number of directory blocks actually mapped under the inode
++di_size+.
*pad*::
Padding to maintain alignment.
@@ -1304,9 +1312,9 @@
* As the first data block always contains ``.'' and ``..'', it's invalid for the
directory to have a hole at the start.
-* The freeindex's +hdr.nvalid+ should always be the same as the number of
+* The freeindex's +hdr.nused+ should always be the same as the number of
allocated data directory blocks containing name/inode data and will always be
-less than or equal to +hdr.nused+. The value of +hdr.nused+ should be the same
+less than or equal to +hdr.nvalid+. The value of +hdr.nvalid+ should be the same
as the index of the last data directory block plus one (i.e. when the last data
block is freed, +nused+ and +nvalid+ are decremented).