Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: rename struct xfs_attr_item to xfs_attr_intent

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>

authored by

Darrick J. Wong and committed by
Dave Chinner
e3c5de22 3768f698

+51 -51
+26 -26
fs/xfs/libxfs/xfs_attr.c
··· 57 57 */ 58 58 STATIC int xfs_attr_node_get(xfs_da_args_t *args); 59 59 STATIC void xfs_attr_restore_rmt_blk(struct xfs_da_args *args); 60 - static int xfs_attr_node_try_addname(struct xfs_attr_item *attr); 61 - STATIC int xfs_attr_node_addname_find_attr(struct xfs_attr_item *attr); 62 - STATIC int xfs_attr_node_remove_attr(struct xfs_attr_item *attr); 60 + static int xfs_attr_node_try_addname(struct xfs_attr_intent *attr); 61 + STATIC int xfs_attr_node_addname_find_attr(struct xfs_attr_intent *attr); 62 + STATIC int xfs_attr_node_remove_attr(struct xfs_attr_intent *attr); 63 63 STATIC int xfs_attr_node_lookup(struct xfs_da_args *args, 64 64 struct xfs_da_state *state); 65 65 ··· 376 376 377 377 static int 378 378 xfs_attr_sf_addname( 379 - struct xfs_attr_item *attr) 379 + struct xfs_attr_intent *attr) 380 380 { 381 381 struct xfs_da_args *args = attr->xattri_da_args; 382 382 struct xfs_inode *dp = args->dp; ··· 422 422 */ 423 423 static enum xfs_delattr_state 424 424 xfs_attr_complete_op( 425 - struct xfs_attr_item *attr, 425 + struct xfs_attr_intent *attr, 426 426 enum xfs_delattr_state replace_state) 427 427 { 428 428 struct xfs_da_args *args = attr->xattri_da_args; ··· 438 438 439 439 static int 440 440 xfs_attr_leaf_addname( 441 - struct xfs_attr_item *attr) 441 + struct xfs_attr_intent *attr) 442 442 { 443 443 struct xfs_da_args *args = attr->xattri_da_args; 444 444 int error; ··· 492 492 */ 493 493 static int 494 494 xfs_attr_node_addname( 495 - struct xfs_attr_item *attr) 495 + struct xfs_attr_intent *attr) 496 496 { 497 497 struct xfs_da_args *args = attr->xattri_da_args; 498 498 int error; ··· 529 529 530 530 static int 531 531 xfs_attr_rmtval_alloc( 532 - struct xfs_attr_item *attr) 532 + struct xfs_attr_intent *attr) 533 533 { 534 534 struct xfs_da_args *args = attr->xattri_da_args; 535 535 int error = 0; ··· 596 596 /* Ensure the da state of an xattr deferred work item is ready to go. */ 597 597 static inline void 598 598 xfs_attr_item_init_da_state( 599 - struct xfs_attr_item *attr) 599 + struct xfs_attr_intent *attr) 600 600 { 601 601 struct xfs_da_args *args = attr->xattri_da_args; 602 602 ··· 613 613 */ 614 614 static 615 615 int xfs_attr_node_removename_setup( 616 - struct xfs_attr_item *attr) 616 + struct xfs_attr_intent *attr) 617 617 { 618 618 struct xfs_da_args *args = attr->xattri_da_args; 619 619 struct xfs_da_state *state; ··· 651 651 */ 652 652 static int 653 653 xfs_attr_leaf_remove_attr( 654 - struct xfs_attr_item *attr) 654 + struct xfs_attr_intent *attr) 655 655 { 656 656 struct xfs_da_args *args = attr->xattri_da_args; 657 657 struct xfs_inode *dp = args->dp; ··· 716 716 */ 717 717 int 718 718 xfs_attr_set_iter( 719 - struct xfs_attr_item *attr) 719 + struct xfs_attr_intent *attr) 720 720 { 721 721 struct xfs_da_args *args = attr->xattri_da_args; 722 722 int error = 0; ··· 893 893 } 894 894 895 895 static int 896 - xfs_attr_item_init( 896 + xfs_attr_intent_init( 897 897 struct xfs_da_args *args, 898 898 unsigned int op_flags, /* op flag (set or remove) */ 899 - struct xfs_attr_item **attr) /* new xfs_attr_item */ 899 + struct xfs_attr_intent **attr) /* new xfs_attr_intent */ 900 900 { 901 901 902 - struct xfs_attr_item *new; 902 + struct xfs_attr_intent *new; 903 903 904 904 new = kmem_cache_zalloc(xfs_attr_intent_cache, GFP_NOFS | __GFP_NOFAIL); 905 905 new->xattri_op_flags = op_flags; ··· 914 914 xfs_attr_defer_add( 915 915 struct xfs_da_args *args) 916 916 { 917 - struct xfs_attr_item *new; 917 + struct xfs_attr_intent *new; 918 918 int error = 0; 919 919 920 - error = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_SET, &new); 920 + error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_SET, &new); 921 921 if (error) 922 922 return error; 923 923 ··· 933 933 xfs_attr_defer_replace( 934 934 struct xfs_da_args *args) 935 935 { 936 - struct xfs_attr_item *new; 936 + struct xfs_attr_intent *new; 937 937 int error = 0; 938 938 939 - error = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_REPLACE, &new); 939 + error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_REPLACE, &new); 940 940 if (error) 941 941 return error; 942 942 ··· 953 953 struct xfs_da_args *args) 954 954 { 955 955 956 - struct xfs_attr_item *new; 956 + struct xfs_attr_intent *new; 957 957 int error; 958 958 959 - error = xfs_attr_item_init(args, XFS_ATTRI_OP_FLAGS_REMOVE, &new); 959 + error = xfs_attr_intent_init(args, XFS_ATTRI_OP_FLAGS_REMOVE, &new); 960 960 if (error) 961 961 return error; 962 962 ··· 1394 1394 1395 1395 STATIC int 1396 1396 xfs_attr_node_addname_find_attr( 1397 - struct xfs_attr_item *attr) 1397 + struct xfs_attr_intent *attr) 1398 1398 { 1399 1399 struct xfs_da_args *args = attr->xattri_da_args; 1400 1400 int error; ··· 1447 1447 */ 1448 1448 static int 1449 1449 xfs_attr_node_try_addname( 1450 - struct xfs_attr_item *attr) 1450 + struct xfs_attr_intent *attr) 1451 1451 { 1452 1452 struct xfs_da_args *args = attr->xattri_da_args; 1453 1453 struct xfs_da_state *state = attr->xattri_da_state; ··· 1513 1513 1514 1514 static int 1515 1515 xfs_attr_node_remove_attr( 1516 - struct xfs_attr_item *attr) 1516 + struct xfs_attr_intent *attr) 1517 1517 { 1518 1518 struct xfs_da_args *args = attr->xattri_da_args; 1519 1519 struct xfs_da_state *state = xfs_da_state_alloc(args); ··· 1616 1616 int __init 1617 1617 xfs_attr_intent_init_cache(void) 1618 1618 { 1619 - xfs_attr_intent_cache = kmem_cache_create("xfs_attr_item", 1620 - sizeof(struct xfs_attr_item), 1619 + xfs_attr_intent_cache = kmem_cache_create("xfs_attr_intent", 1620 + sizeof(struct xfs_attr_intent), 1621 1621 0, 0, NULL); 1622 1622 1623 1623 return xfs_attr_intent_cache != NULL ? 0 : -ENOMEM;
+4 -4
fs/xfs/libxfs/xfs_attr.h
··· 434 434 */ 435 435 436 436 /* 437 - * Enum values for xfs_attr_item.xattri_da_state 437 + * Enum values for xfs_attr_intent.xattri_da_state 438 438 * 439 439 * These values are used by delayed attribute operations to keep track of where 440 440 * they were before they returned -EAGAIN. A return code of -EAGAIN signals the ··· 504 504 /* 505 505 * Context used for keeping track of delayed attribute operations 506 506 */ 507 - struct xfs_attr_item { 507 + struct xfs_attr_intent { 508 508 /* 509 509 * used to log this item to an intent containing a list of attrs to 510 510 * commit later ··· 551 551 int xfs_attr_get_ilocked(struct xfs_da_args *args); 552 552 int xfs_attr_get(struct xfs_da_args *args); 553 553 int xfs_attr_set(struct xfs_da_args *args); 554 - int xfs_attr_set_iter(struct xfs_attr_item *attr); 555 - int xfs_attr_remove_iter(struct xfs_attr_item *attr); 554 + int xfs_attr_set_iter(struct xfs_attr_intent *attr); 555 + int xfs_attr_remove_iter(struct xfs_attr_intent *attr); 556 556 bool xfs_attr_namecheck(const void *name, size_t length); 557 557 int xfs_attr_calc_size(struct xfs_da_args *args, int *local); 558 558 void xfs_init_attr_trans(struct xfs_da_args *args, struct xfs_trans_res *tres,
+3 -3
fs/xfs/libxfs/xfs_attr_remote.c
··· 568 568 */ 569 569 int 570 570 xfs_attr_rmtval_find_space( 571 - struct xfs_attr_item *attr) 571 + struct xfs_attr_intent *attr) 572 572 { 573 573 struct xfs_da_args *args = attr->xattri_da_args; 574 574 struct xfs_bmbt_irec *map = &attr->xattri_map; ··· 598 598 */ 599 599 int 600 600 xfs_attr_rmtval_set_blk( 601 - struct xfs_attr_item *attr) 601 + struct xfs_attr_intent *attr) 602 602 { 603 603 struct xfs_da_args *args = attr->xattri_da_args; 604 604 struct xfs_inode *dp = args->dp; ··· 674 674 */ 675 675 int 676 676 xfs_attr_rmtval_remove( 677 - struct xfs_attr_item *attr) 677 + struct xfs_attr_intent *attr) 678 678 { 679 679 struct xfs_da_args *args = attr->xattri_da_args; 680 680 int error, done;
+3 -3
fs/xfs/libxfs/xfs_attr_remote.h
··· 12 12 int xfs_attr_rmtval_stale(struct xfs_inode *ip, struct xfs_bmbt_irec *map, 13 13 xfs_buf_flags_t incore_flags); 14 14 int xfs_attr_rmtval_invalidate(struct xfs_da_args *args); 15 - int xfs_attr_rmtval_remove(struct xfs_attr_item *attr); 15 + int xfs_attr_rmtval_remove(struct xfs_attr_intent *attr); 16 16 int xfs_attr_rmt_find_hole(struct xfs_da_args *args); 17 17 int xfs_attr_rmtval_set_value(struct xfs_da_args *args); 18 - int xfs_attr_rmtval_set_blk(struct xfs_attr_item *attr); 19 - int xfs_attr_rmtval_find_space(struct xfs_attr_item *attr); 18 + int xfs_attr_rmtval_set_blk(struct xfs_attr_intent *attr); 19 + int xfs_attr_rmtval_find_space(struct xfs_attr_intent *attr); 20 20 #endif /* __XFS_ATTR_REMOTE_H__ */
+12 -12
fs/xfs/xfs_attr_item.c
··· 300 300 */ 301 301 STATIC int 302 302 xfs_xattri_finish_update( 303 - struct xfs_attr_item *attr, 303 + struct xfs_attr_intent *attr, 304 304 struct xfs_attrd_log_item *attrdp) 305 305 { 306 306 struct xfs_da_args *args = attr->xattri_da_args; ··· 338 338 xfs_attr_log_item( 339 339 struct xfs_trans *tp, 340 340 struct xfs_attri_log_item *attrip, 341 - struct xfs_attr_item *attr) 341 + const struct xfs_attr_intent *attr) 342 342 { 343 343 struct xfs_attri_log_format *attrp; 344 344 ··· 346 346 set_bit(XFS_LI_DIRTY, &attrip->attri_item.li_flags); 347 347 348 348 /* 349 - * At this point the xfs_attr_item has been constructed, and we've 349 + * At this point the xfs_attr_intent has been constructed, and we've 350 350 * created the log intent. Fill in the attri log item and log format 351 - * structure with fields from this xfs_attr_item 351 + * structure with fields from this xfs_attr_intent 352 352 */ 353 353 attrp = &attrip->attri_format; 354 354 attrp->alfi_ino = attr->xattri_da_args->dp->i_ino; ··· 377 377 { 378 378 struct xfs_mount *mp = tp->t_mountp; 379 379 struct xfs_attri_log_item *attrip; 380 - struct xfs_attr_item *attr; 380 + struct xfs_attr_intent *attr; 381 381 382 382 ASSERT(count == 1); 383 383 ··· 403 403 404 404 static inline void 405 405 xfs_attr_free_item( 406 - struct xfs_attr_item *attr) 406 + struct xfs_attr_intent *attr) 407 407 { 408 408 if (attr->xattri_da_state) 409 409 xfs_da_state_free(attr->xattri_da_state); ··· 421 421 struct list_head *item, 422 422 struct xfs_btree_cur **state) 423 423 { 424 - struct xfs_attr_item *attr; 424 + struct xfs_attr_intent *attr; 425 425 struct xfs_attrd_log_item *done_item = NULL; 426 426 int error; 427 427 428 - attr = container_of(item, struct xfs_attr_item, xattri_list); 428 + attr = container_of(item, struct xfs_attr_intent, xattri_list); 429 429 if (done) 430 430 done_item = ATTRD_ITEM(done); 431 431 ··· 455 455 xfs_attr_cancel_item( 456 456 struct list_head *item) 457 457 { 458 - struct xfs_attr_item *attr; 458 + struct xfs_attr_intent *attr; 459 459 460 - attr = container_of(item, struct xfs_attr_item, xattri_list); 460 + attr = container_of(item, struct xfs_attr_intent, xattri_list); 461 461 xfs_attr_free_item(attr); 462 462 } 463 463 ··· 540 540 struct list_head *capture_list) 541 541 { 542 542 struct xfs_attri_log_item *attrip = ATTRI_ITEM(lip); 543 - struct xfs_attr_item *attr; 543 + struct xfs_attr_intent *attr; 544 544 struct xfs_mount *mp = lip->li_log->l_mp; 545 545 struct xfs_inode *ip; 546 546 struct xfs_da_args *args; ··· 565 565 if (error) 566 566 return error; 567 567 568 - attr = kmem_zalloc(sizeof(struct xfs_attr_item) + 568 + attr = kmem_zalloc(sizeof(struct xfs_attr_intent) + 569 569 sizeof(struct xfs_da_args), KM_NOFS); 570 570 args = (struct xfs_da_args *)(attr + 1); 571 571
+3 -3
fs/xfs/xfs_attr_item.h
··· 15 15 * This is the "attr intention" log item. It is used to log the fact that some 16 16 * extended attribute operations need to be processed. An operation is 17 17 * currently either a set or remove. Set or remove operations are described by 18 - * the xfs_attr_item which may be logged to this intent. 18 + * the xfs_attr_intent which may be logged to this intent. 19 19 * 20 20 * During a normal attr operation, name and value point to the name and value 21 21 * fields of the caller's xfs_da_args structure. During a recovery, the name 22 22 * and value buffers are copied from the log, and stored in a trailing buffer 23 - * attached to the xfs_attr_item until they are committed. They are freed when 24 - * the xfs_attr_item itself is freed when the work is done. 23 + * attached to the xfs_attr_intent until they are committed. They are freed 24 + * when the xfs_attr_intent itself is freed when the work is done. 25 25 */ 26 26 struct xfs_attri_log_item { 27 27 struct xfs_log_item attri_item;