]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: rename struct xfs_attr_item to xfs_attr_intent
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: e3c5de22026fda01674c400b97f96857dfb58aab

Everywhere else in XFS, structures that capture the state of an ongoing
deferred work item all have names that end with "_intent".  The new
extended attribute deferred work items are not named as such, so fix it
to follow the naming convention used elsewhere.

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

index c5f7ca7e50fe4ed661d92fec848785c076b3d73b..ce933e34322711bf56e222859d72fee9285890b3 100644 (file)
@@ -487,7 +487,7 @@ xfs_attr_create_done(
 
 static inline void
 xfs_attr_free_item(
-       struct xfs_attr_item    *attr)
+       struct xfs_attr_intent  *attr)
 {
        if (attr->xattri_da_state)
                xfs_da_state_free(attr->xattri_da_state);
@@ -505,11 +505,11 @@ xfs_attr_finish_item(
        struct list_head        *item,
        struct xfs_btree_cur    **state)
 {
-       struct xfs_attr_item    *attr;
+       struct xfs_attr_intent  *attr;
        int                     error;
        struct xfs_da_args      *args;
 
-       attr = container_of(item, struct xfs_attr_item, xattri_list);
+       attr = container_of(item, struct xfs_attr_intent, xattri_list);
        args = attr->xattri_da_args;
 
        /*
@@ -538,9 +538,9 @@ static void
 xfs_attr_cancel_item(
        struct list_head        *item)
 {
-       struct xfs_attr_item    *attr;
+       struct xfs_attr_intent  *attr;
 
-       attr = container_of(item, struct xfs_attr_item, xattri_list);
+       attr = container_of(item, struct xfs_attr_intent, xattri_list);
        xfs_attr_free_item(attr);
 }
 
index 5ed13aa1530a1d0c5a86a11645c28bb0947be84d..351391e4d3f78bd30af95de8d30b7fd6c40b087b 100644 (file)
@@ -55,9 +55,9 @@ STATIC int xfs_attr_leaf_try_add(struct xfs_da_args *args, struct xfs_buf *bp);
  */
 STATIC int xfs_attr_node_get(xfs_da_args_t *args);
 STATIC void xfs_attr_restore_rmt_blk(struct xfs_da_args *args);
-static int xfs_attr_node_try_addname(struct xfs_attr_item *attr);
-STATIC int xfs_attr_node_addname_find_attr(struct xfs_attr_item *attr);
-STATIC int xfs_attr_node_remove_attr(struct xfs_attr_item *attr);
+static int xfs_attr_node_try_addname(struct xfs_attr_intent *attr);
+STATIC int xfs_attr_node_addname_find_attr(struct xfs_attr_intent *attr);
+STATIC int xfs_attr_node_remove_attr(struct xfs_attr_intent *attr);
 STATIC int xfs_attr_node_lookup(struct xfs_da_args *args,
                struct xfs_da_state *state);
 
@@ -374,7 +374,7 @@ xfs_attr_try_sf_addname(
 
 static int
 xfs_attr_sf_addname(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        struct xfs_inode                *dp = args->dp;
@@ -420,7 +420,7 @@ out:
  */
 static enum xfs_delattr_state
 xfs_attr_complete_op(
-       struct xfs_attr_item    *attr,
+       struct xfs_attr_intent  *attr,
        enum xfs_delattr_state  replace_state)
 {
        struct xfs_da_args      *args = attr->xattri_da_args;
@@ -436,7 +436,7 @@ xfs_attr_complete_op(
 
 static int
 xfs_attr_leaf_addname(
-       struct xfs_attr_item    *attr)
+       struct xfs_attr_intent  *attr)
 {
        struct xfs_da_args      *args = attr->xattri_da_args;
        int                     error;
@@ -490,7 +490,7 @@ out:
  */
 static int
 xfs_attr_node_addname(
-       struct xfs_attr_item    *attr)
+       struct xfs_attr_intent  *attr)
 {
        struct xfs_da_args      *args = attr->xattri_da_args;
        int                     error;
@@ -527,7 +527,7 @@ out:
 
 static int
 xfs_attr_rmtval_alloc(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        int                             error = 0;
@@ -594,7 +594,7 @@ xfs_attr_leaf_mark_incomplete(
 /* Ensure the da state of an xattr deferred work item is ready to go. */
 static inline void
 xfs_attr_item_init_da_state(
-       struct xfs_attr_item    *attr)
+       struct xfs_attr_intent  *attr)
 {
        struct xfs_da_args      *args = attr->xattri_da_args;
 
@@ -611,7 +611,7 @@ xfs_attr_item_init_da_state(
  */
 static
 int xfs_attr_node_removename_setup(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        struct xfs_da_state             *state;
@@ -649,7 +649,7 @@ out:
  */
 static int
 xfs_attr_leaf_remove_attr(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        struct xfs_inode                *dp = args->dp;
@@ -714,7 +714,7 @@ xfs_attr_leaf_shrink(
  */
 int
 xfs_attr_set_iter(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        int                             error = 0;
@@ -891,13 +891,13 @@ xfs_attr_lookup(
 }
 
 static int
-xfs_attr_item_init(
+xfs_attr_intent_init(
        struct xfs_da_args      *args,
        unsigned int            op_flags,       /* op flag (set or remove) */
-       struct xfs_attr_item    **attr)         /* new xfs_attr_item */
+       struct xfs_attr_intent  **attr)         /* new xfs_attr_intent */
 {
 
-       struct xfs_attr_item    *new;
+       struct xfs_attr_intent  *new;
 
        new = kmem_cache_zalloc(xfs_attr_intent_cache, GFP_NOFS | __GFP_NOFAIL);
        new->xattri_op_flags = op_flags;
@@ -912,10 +912,10 @@ static int
 xfs_attr_defer_add(
        struct xfs_da_args      *args)
 {
-       struct xfs_attr_item    *new;
+       struct xfs_attr_intent  *new;
        int                     error = 0;
 
-       error = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_SET, &new);
+       error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_SET, &new);
        if (error)
                return error;
 
@@ -931,10 +931,10 @@ static int
 xfs_attr_defer_replace(
        struct xfs_da_args      *args)
 {
-       struct xfs_attr_item    *new;
+       struct xfs_attr_intent  *new;
        int                     error = 0;
 
-       error = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_REPLACE, &new);
+       error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_REPLACE, &new);
        if (error)
                return error;
 
@@ -951,10 +951,10 @@ xfs_attr_defer_remove(
        struct xfs_da_args      *args)
 {
 
-       struct xfs_attr_item    *new;
+       struct xfs_attr_intent  *new;
        int                     error;
 
-       error  = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_REMOVE, &new);
+       error  = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_REMOVE, &new);
        if (error)
                return error;
 
@@ -1392,7 +1392,7 @@ xfs_attr_node_lookup(
 
 STATIC int
 xfs_attr_node_addname_find_attr(
-        struct xfs_attr_item   *attr)
+        struct xfs_attr_intent *attr)
 {
        struct xfs_da_args      *args = attr->xattri_da_args;
        int                     error;
@@ -1445,7 +1445,7 @@ error:
  */
 static int
 xfs_attr_node_try_addname(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        struct xfs_da_state             *state = attr->xattri_da_state;
@@ -1511,7 +1511,7 @@ xfs_attr_node_removename(
 
 static int
 xfs_attr_node_remove_attr(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        struct xfs_da_state             *state = xfs_da_state_alloc(args);
@@ -1614,8 +1614,8 @@ xfs_attr_namecheck(
 int __init
 xfs_attr_intent_init_cache(void)
 {
-       xfs_attr_intent_cache = kmem_cache_create("xfs_attr_item",
-                       sizeof(struct xfs_attr_item),
+       xfs_attr_intent_cache = kmem_cache_create("xfs_attr_intent",
+                       sizeof(struct xfs_attr_intent),
                        0, 0, NULL);
 
        return xfs_attr_intent_cache != NULL ? 0 : -ENOMEM;
index 22a2f288c1c0ed1cac4d77deed4ef7bfd32c93f3..b88b6d74e4fc922c6bddf03b12efce7999657fec 100644 (file)
@@ -434,7 +434,7 @@ struct xfs_attr_list_context {
  */
 
 /*
- * Enum values for xfs_attr_item.xattri_da_state
+ * Enum values for xfs_attr_intent.xattri_da_state
  *
  * These values are used by delayed attribute operations to keep track  of where
  * they were before they returned -EAGAIN.  A return code of -EAGAIN signals the
@@ -504,7 +504,7 @@ enum xfs_delattr_state {
 /*
  * Context used for keeping track of delayed attribute operations
  */
-struct xfs_attr_item {
+struct xfs_attr_intent {
        /*
         * used to log this item to an intent containing a list of attrs to
         * commit later
@@ -551,8 +551,8 @@ bool xfs_attr_is_leaf(struct xfs_inode *ip);
 int xfs_attr_get_ilocked(struct xfs_da_args *args);
 int xfs_attr_get(struct xfs_da_args *args);
 int xfs_attr_set(struct xfs_da_args *args);
-int xfs_attr_set_iter(struct xfs_attr_item *attr);
-int xfs_attr_remove_iter(struct xfs_attr_item *attr);
+int xfs_attr_set_iter(struct xfs_attr_intent *attr);
+int xfs_attr_remove_iter(struct xfs_attr_intent *attr);
 bool xfs_attr_namecheck(const void *name, size_t length);
 int xfs_attr_calc_size(struct xfs_da_args *args, int *local);
 void xfs_init_attr_trans(struct xfs_da_args *args, struct xfs_trans_res *tres,
index 40215a4dba5d27ad426afdf9f347eb31a65c58ca..330c9262c671d7afd62baf079309ef087e3ff522 100644 (file)
@@ -567,7 +567,7 @@ xfs_attr_rmtval_stale(
  */
 int
 xfs_attr_rmtval_find_space(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        struct xfs_bmbt_irec            *map = &attr->xattri_map;
@@ -597,7 +597,7 @@ xfs_attr_rmtval_find_space(
  */
 int
 xfs_attr_rmtval_set_blk(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        struct xfs_inode                *dp = args->dp;
@@ -673,7 +673,7 @@ xfs_attr_rmtval_invalidate(
  */
 int
 xfs_attr_rmtval_remove(
-       struct xfs_attr_item            *attr)
+       struct xfs_attr_intent          *attr)
 {
        struct xfs_da_args              *args = attr->xattri_da_args;
        int                             error, done;
index 62b398edec3f3e595188bcda7b7bf81ce9f6a2fe..d097ec6c4dc35aeefbbd9c3ff620e8126956231e 100644 (file)
@@ -12,9 +12,9 @@ int xfs_attr_rmtval_get(struct xfs_da_args *args);
 int xfs_attr_rmtval_stale(struct xfs_inode *ip, struct xfs_bmbt_irec *map,
                xfs_buf_flags_t incore_flags);
 int xfs_attr_rmtval_invalidate(struct xfs_da_args *args);
-int xfs_attr_rmtval_remove(struct xfs_attr_item *attr);
+int xfs_attr_rmtval_remove(struct xfs_attr_intent *attr);
 int xfs_attr_rmt_find_hole(struct xfs_da_args *args);
 int xfs_attr_rmtval_set_value(struct xfs_da_args *args);
-int xfs_attr_rmtval_set_blk(struct xfs_attr_item *attr);
-int xfs_attr_rmtval_find_space(struct xfs_attr_item *attr);
+int xfs_attr_rmtval_set_blk(struct xfs_attr_intent *attr);
+int xfs_attr_rmtval_find_space(struct xfs_attr_intent *attr);
 #endif /* __XFS_ATTR_REMOTE_H__ */