docs: clarify what the ATTRBIT and ATTR2BIT feature flags do
diff mbox

Message ID 20170110225305.GN14038@birch.djwong.org
State Not Applicable
Headers show

Commit Message

Darrick J. Wong Jan. 10, 2017, 10:53 p.m. UTC
It would seem that the disk format doesn't actually change depending on
ATTRBIT and ATTR2BIT.  The key difference is that ATTR2BIT (without the
'noattr2' mount option) allows di_forkoff to change depending on how
much space the attr fork needs, whereas ATTRBIT (without ATTR2BIT or
the 'attr2' mount option) does not allow di_forkoff to change.

In other words, at least one of the bits must be set if there are
extended attributes, but between the two bits the only difference is a
change in the default di_forkoff adjustment behaviors.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 .../allocation_groups.asciidoc                     |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/design/XFS_Filesystem_Structure/allocation_groups.asciidoc b/design/XFS_Filesystem_Structure/allocation_groups.asciidoc
index 51ca57d..68f934a 100644
--- a/design/XFS_Filesystem_Structure/allocation_groups.asciidoc
+++ b/design/XFS_Filesystem_Structure/allocation_groups.asciidoc
@@ -174,7 +174,13 @@  indicate features introduced over time. If the value of the lower nibble is >=
 [options="header"]
 |=====
 | Flag				| Description
-| +XFS_SB_VERSION_ATTRBIT+	| Set if any inode have extended attributes.
+| +XFS_SB_VERSION_ATTRBIT+	|
+Set if any inode have extended attributes.  If this bit is set; the
++XFS_SB_VERSION2_ATTR2BIT+ is not set; and the +attr2+ mount flag is not
+specified, the +di_forkoff+ inode field will not be dynamically adjusted.
+See the section about xref:Extended_Attribute_Versions[extended attribute
+versions] for more information.
+
 | +XFS_SB_VERSION_NLINKBIT+	| Set if any inodes use 32-bit di_nlink values.
 | +XFS_SB_VERSION_QUOTABIT+	|
 Quotas are enabled on the filesystem. This
@@ -335,10 +341,11 @@  performance. The global free space and inode counts are only updated in the
 primary superblock when the filesystem is cleanly unmounted.
 
 | +XFS_SB_VERSION2_ATTR2BIT+	|
-Extended attributes version 2. Making a filesystem with this optimises the inode
-layout of extended attributes.  See the section about
-xref:Extended_Attribute_Versions[extended attribute versions] for more
-information.
+Extended attributes version 2. Making a filesystem with this optimises the
+inode layout of extended attributes.  If this bit is set and the +noattr2+
+mount flag is not specified, the +di_forkoff+ inode field will be dynamically
+adjusted.  See the section about xref:Extended_Attribute_Versions[extended
+attribute versions] for more information.
 
 | +XFS_SB_VERSION2_PARENTBIT+	|
 Parent pointers. All inodes must have an extended attribute that points back to