aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_attr.h
diff options
context:
space:
mode:
authorGravatar Dave Chinner <dchinner@redhat.com> 2022-05-12 15:12:55 +1000
committerGravatar Dave Chinner <david@fromorbit.com> 2022-05-12 15:12:55 +1000
commit7d03533629d1c3fca395e6fd0935ca1de676f2bc (patch)
tree30ef6ce98330e41446655cf3a10182ce61168f72 /fs/xfs/libxfs/xfs_attr.h
parentxfs: consolidate leaf/node states in xfs_attr_set_iter (diff)
downloadlinux-7d03533629d1c3fca395e6fd0935ca1de676f2bc.tar.gz
linux-7d03533629d1c3fca395e6fd0935ca1de676f2bc.tar.bz2
linux-7d03533629d1c3fca395e6fd0935ca1de676f2bc.zip
xfs: split remote attr setting out from replace path
When we set a new xattr, we have three exit paths: 1. nothing else to do 2. allocate and set the remote xattr value 3. perform the rest of a replace operation Currently we push both 2 and 3 into the same state, regardless of whether we just set a remote attribute or not. Once we've set the remote xattr, we have two exit states: 1. nothing else to do 2. perform the rest of a replace operation Hence we can split the remote xattr allocation and setting into their own states and factor it out of xfs_attr_set_iter() to further clean up the state machine and the implementation of the state machine. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Allison Henderson<allison.henderson@oracle.com> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_attr.h')
-rw-r--r--fs/xfs/libxfs/xfs_attr.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.h b/fs/xfs/libxfs/xfs_attr.h
index 908a13d61716..a0e631df1e24 100644
--- a/fs/xfs/libxfs/xfs_attr.h
+++ b/fs/xfs/libxfs/xfs_attr.h
@@ -452,15 +452,17 @@ enum xfs_delattr_state {
XFS_DAS_RM_SHRINK, /* We are shrinking the tree */
/* Leaf state set sequence */
- XFS_DAS_FOUND_LBLK, /* We found leaf blk for attr */
+ XFS_DAS_LEAF_SET_RMT, /* set a remote xattr from a leaf */
XFS_DAS_LEAF_ALLOC_RMT, /* We are allocating remote blocks */
+ XFS_DAS_LEAF_REPLACE, /* Perform replace ops on a leaf */
XFS_DAS_FLIP_LFLAG, /* Flipped leaf INCOMPLETE attr flag */
XFS_DAS_RM_LBLK, /* A rename is removing leaf blocks */
XFS_DAS_RD_LEAF, /* Read in the new leaf */
/* Node state set sequence, must match leaf state above */
- XFS_DAS_FOUND_NBLK, /* We found node blk for attr */
+ XFS_DAS_NODE_SET_RMT, /* set a remote xattr from a node */
XFS_DAS_NODE_ALLOC_RMT, /* We are allocating remote blocks */
+ XFS_DAS_NODE_REPLACE, /* Perform replace ops on a node */
XFS_DAS_FLIP_NFLAG, /* Flipped node INCOMPLETE attr flag */
XFS_DAS_RM_NBLK, /* A rename is removing node blocks */
XFS_DAS_CLR_FLAG, /* Clear incomplete flag */
@@ -476,13 +478,15 @@ enum xfs_delattr_state {
{ XFS_DAS_RMTBLK, "XFS_DAS_RMTBLK" }, \
{ XFS_DAS_RM_NAME, "XFS_DAS_RM_NAME" }, \
{ XFS_DAS_RM_SHRINK, "XFS_DAS_RM_SHRINK" }, \
- { XFS_DAS_FOUND_LBLK, "XFS_DAS_FOUND_LBLK" }, \
+ { XFS_DAS_LEAF_SET_RMT, "XFS_DAS_LEAF_SET_RMT" }, \
{ XFS_DAS_LEAF_ALLOC_RMT, "XFS_DAS_LEAF_ALLOC_RMT" }, \
- { XFS_DAS_FOUND_NBLK, "XFS_DAS_FOUND_NBLK" }, \
- { XFS_DAS_NODE_ALLOC_RMT, "XFS_DAS_NODE_ALLOC_RMT" }, \
+ { XFS_DAS_LEAF_REPLACE, "XFS_DAS_LEAF_REPLACE" }, \
{ XFS_DAS_FLIP_LFLAG, "XFS_DAS_FLIP_LFLAG" }, \
{ XFS_DAS_RM_LBLK, "XFS_DAS_RM_LBLK" }, \
{ XFS_DAS_RD_LEAF, "XFS_DAS_RD_LEAF" }, \
+ { XFS_DAS_NODE_SET_RMT, "XFS_DAS_NODE_SET_RMT" }, \
+ { XFS_DAS_NODE_ALLOC_RMT, "XFS_DAS_NODE_ALLOC_RMT" }, \
+ { XFS_DAS_NODE_REPLACE, "XFS_DAS_NODE_REPLACE" }, \
{ XFS_DAS_FLIP_NFLAG, "XFS_DAS_FLIP_NFLAG" }, \
{ XFS_DAS_RM_NBLK, "XFS_DAS_RM_NBLK" }, \
{ XFS_DAS_CLR_FLAG, "XFS_DAS_CLR_FLAG" }, \