]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: log parent pointer xattr setting operations
authorDarrick J. Wong <djwong@kernel.org>
Tue, 9 Jan 2024 17:41:31 +0000 (09:41 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 10 Apr 2024 00:21:29 +0000 (17:21 -0700)
The parent pointer code needs to do a deferred parent pointer set
operation with the xattr log intent code.  Declare a new logged xattr
opcode and push it through the log.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/defer_item.c
libxfs/xfs_log_format.h

index 1b67f44570780138d8e036a1de0e1716d67aee99..0786fdef569e4c3145e58ac58769111d7f6805c4 100644 (file)
@@ -712,6 +712,9 @@ xfs_attr_defer_parent(
 
        switch (op) {
        case XFS_ATTR_DEFER_SET:
+               new->xattri_op_flags = XFS_ATTRI_OP_FLAGS_PPTR_SET;
+               new->xattri_dela_state = xfs_attr_init_add_state(args);
+               break;
        case XFS_ATTR_DEFER_REPLACE:
                /* will be added in subsequent patches */
                ASSERT(0);
index 52dcee4b3abe65df8a581a253d37c020d6dae9d3..96732a212507e1f995b71dab2f5a8b2210c9f805 100644 (file)
@@ -1026,6 +1026,7 @@ struct xfs_icreate_log {
 #define XFS_ATTRI_OP_FLAGS_SET         1       /* Set the attribute */
 #define XFS_ATTRI_OP_FLAGS_REMOVE      2       /* Remove the attribute */
 #define XFS_ATTRI_OP_FLAGS_REPLACE     3       /* Replace the attribute */
+#define XFS_ATTRI_OP_FLAGS_PPTR_SET    4       /* Set parent pointer */
 #define XFS_ATTRI_OP_FLAGS_PPTR_REMOVE 5       /* Remove parent pointer */
 #define XFS_ATTRI_OP_FLAGS_TYPE_MASK   0xFF    /* Flags type mask */