From: Darrick J. Wong Date: Tue, 9 Jan 2024 17:41:31 +0000 (-0800) Subject: xfs: log parent pointer xattr setting operations X-Git-Tag: xfs-zoned-old-2024-06-10~382 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b80f9da2451e8cd94514b69445ee390a3b74fa9b;p=users%2Fhch%2Fxfsprogs.git xfs: log parent pointer xattr setting operations 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 --- diff --git a/libxfs/defer_item.c b/libxfs/defer_item.c index 1b67f4457..0786fdef5 100644 --- a/libxfs/defer_item.c +++ b/libxfs/defer_item.c @@ -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); diff --git a/libxfs/xfs_log_format.h b/libxfs/xfs_log_format.h index 52dcee4b3..96732a212 100644 --- a/libxfs/xfs_log_format.h +++ b/libxfs/xfs_log_format.h @@ -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 */