]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: add parent pointer support to attribute code
authorAllison Henderson <allison.henderson@oracle.com>
Mon, 29 Jul 2024 23:22:45 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:02 +0000 (17:01 -0700)
Source kernel commit: 98493ff878859eb0adefbc57a49ad47a92dfd252

Add the new parent attribute type. XFS_ATTR_PARENT is used only for parent pointer
entries; it uses reserved blocks like XFS_ATTR_ROOT.

Signed-off-by: Mark Tinguely <mark.tinguely@oracle.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_da_format.h
libxfs/xfs_log_format.h

index ecd0616f5776a2f52e993bf20fe575d4717e0d2a..0c80f7ab9475ad3a4b1bfd89903ecc1cb78121fc 100644 (file)
@@ -714,13 +714,17 @@ struct xfs_attr3_leafblock {
 #define        XFS_ATTR_LOCAL_BIT      0       /* attr is stored locally */
 #define        XFS_ATTR_ROOT_BIT       1       /* limit access to trusted attrs */
 #define        XFS_ATTR_SECURE_BIT     2       /* limit access to secure attrs */
+#define        XFS_ATTR_PARENT_BIT     3       /* parent pointer attrs */
 #define        XFS_ATTR_INCOMPLETE_BIT 7       /* attr in middle of create/delete */
 #define XFS_ATTR_LOCAL         (1u << XFS_ATTR_LOCAL_BIT)
 #define XFS_ATTR_ROOT          (1u << XFS_ATTR_ROOT_BIT)
 #define XFS_ATTR_SECURE                (1u << XFS_ATTR_SECURE_BIT)
+#define XFS_ATTR_PARENT                (1u << XFS_ATTR_PARENT_BIT)
 #define XFS_ATTR_INCOMPLETE    (1u << XFS_ATTR_INCOMPLETE_BIT)
 
-#define XFS_ATTR_NSP_ONDISK_MASK       (XFS_ATTR_ROOT | XFS_ATTR_SECURE)
+#define XFS_ATTR_NSP_ONDISK_MASK       (XFS_ATTR_ROOT | \
+                                        XFS_ATTR_SECURE | \
+                                        XFS_ATTR_PARENT)
 
 #define XFS_ATTR_ONDISK_MASK   (XFS_ATTR_NSP_ONDISK_MASK | \
                                 XFS_ATTR_LOCAL | \
@@ -729,7 +733,8 @@ struct xfs_attr3_leafblock {
 #define XFS_ATTR_NAMESPACE_STR \
        { XFS_ATTR_LOCAL,       "local" }, \
        { XFS_ATTR_ROOT,        "root" }, \
-       { XFS_ATTR_SECURE,      "secure" }
+       { XFS_ATTR_SECURE,      "secure" }, \
+       { XFS_ATTR_PARENT,      "parent" }
 
 /*
  * Alignment for namelist and valuelist entries (since they are mixed
index accba2acd623df9ebdf4d080b56153d2300d007f..020aebd101432d96ccedf9d86b4360aaa7d1dcf6 100644 (file)
@@ -1034,6 +1034,7 @@ struct xfs_icreate_log {
  */
 #define XFS_ATTRI_FILTER_MASK          (XFS_ATTR_ROOT | \
                                         XFS_ATTR_SECURE | \
+                                        XFS_ATTR_PARENT | \
                                         XFS_ATTR_INCOMPLETE)
 
 /*