]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: put the xattr intent item op flags in their own namespace
authorDarrick J. Wong <djwong@kernel.org>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
Source kernel commit: b53d212b4b5c29ab16edb7eca2b0e05927b7aa34

The flags that are stored in the extended attr intent log item really
should have a separate namespace from the rest of the XFS_ATTR_* flags.
Give them one to make it a little more obvious that they're intent item
flags.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr.c
libxfs/xfs_attr.h
libxfs/xfs_log_format.h

index e214e286ff682d065b391cabbd929580b17f0530..ed81123d4e5c35c47dfa3398cda90076ae974169 100644 (file)
@@ -916,7 +916,7 @@ xfs_attr_defer_add(
        struct xfs_attr_item    *new;
        int                     error = 0;
 
-       error = xfs_attr_item_init(args, XFS_ATTR_OP_FLAGS_SET, &new);
+       error = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_SET, &new);
        if (error)
                return error;
 
@@ -935,7 +935,7 @@ xfs_attr_defer_replace(
        struct xfs_attr_item    *new;
        int                     error = 0;
 
-       error = xfs_attr_item_init(args, XFS_ATTR_OP_FLAGS_REPLACE, &new);
+       error = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_REPLACE, &new);
        if (error)
                return error;
 
@@ -955,7 +955,7 @@ xfs_attr_defer_remove(
        struct xfs_attr_item    *new;
        int                     error;
 
-       error  = xfs_attr_item_init(args, XFS_ATTR_OP_FLAGS_REMOVE, &new);
+       error  = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_REMOVE, &new);
        if (error)
                return error;
 
index 1af7abe29eefbbd7cd8985e2dfbd284073028527..c739caa11a4b3fbde79244cf72e31e36fa5d45c4 100644 (file)
@@ -530,7 +530,7 @@ struct xfs_attr_item {
        enum xfs_delattr_state          xattri_dela_state;
 
        /*
-        * Attr operation being performed - XFS_ATTR_OP_FLAGS_*
+        * Attr operation being performed - XFS_ATTRI_OP_FLAGS_*
         */
        unsigned int                    xattri_op_flags;
 
index a9d08f3d468238ad20b25ce35715a0d35b6bccb0..b351b9dc656184369b433640b18f22992114113b 100644 (file)
@@ -906,10 +906,10 @@ struct xfs_icreate_log {
  * Flags for deferred attribute operations.
  * Upper bits are flags, lower byte is type code
  */
-#define XFS_ATTR_OP_FLAGS_SET          1       /* Set the attribute */
-#define XFS_ATTR_OP_FLAGS_REMOVE       2       /* Remove the attribute */
-#define XFS_ATTR_OP_FLAGS_REPLACE      3       /* Replace the attribute */
-#define XFS_ATTR_OP_FLAGS_TYPE_MASK    0xFF    /* Flags type mask */
+#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_TYPE_MASK   0xFF    /* Flags type mask */
 
 /*
  * alfi_attr_filter captures the state of xfs_da_args.attr_filter, so it should