From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] xfsdocs: fix description of directory free block nvalid and nused header fields
Date: Tue, 17 Oct 2017 21:57:59 -0700 [thread overview]
Message-ID: <20171018045759.GC4703@magnolia> (raw)
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>
---
.../XFS_Filesystem_Structure/directories.asciidoc | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
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 magic number of the free block, ``XD2F'' (0x0x58443246).
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 @@ v3 directory block header. The magic number is "XDF3" (0x0x58444633).
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 @@ value is decremented and the associated +bests[]+ entry is set to 0xffff.
* 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).
reply other threads:[~2017-10-18 4:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171018045759.GC4703@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox