xfs_attr.h (762f99f4f3cb41a775b5157dd761217beba65873) | xfs_attr.h (fd920008784ead369e79c2be2f8d9cc736e306ca) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (c) 2000,2002-2003,2005 Silicon Graphics, Inc. 4 * All Rights Reserved. 5 */ 6#ifndef __XFS_ATTR_H__ 7#define __XFS_ATTR_H__ 8 --- 14 unchanged lines hidden (view full) --- 23 24/* 25 * The maximum size (into the kernel or returned from the kernel) of an 26 * attribute value or the buffer used for an attr_list() call. Larger 27 * sizes will result in an ERANGE return code. 28 */ 29#define ATTR_MAX_VALUELEN (64*1024) /* max length of a value */ 30 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (c) 2000,2002-2003,2005 Silicon Graphics, Inc. 4 * All Rights Reserved. 5 */ 6#ifndef __XFS_ATTR_H__ 7#define __XFS_ATTR_H__ 8 --- 14 unchanged lines hidden (view full) --- 23 24/* 25 * The maximum size (into the kernel or returned from the kernel) of an 26 * attribute value or the buffer used for an attr_list() call. Larger 27 * sizes will result in an ERANGE return code. 28 */ 29#define ATTR_MAX_VALUELEN (64*1024) /* max length of a value */ 30 |
31static inline bool xfs_has_larp(struct xfs_mount *mp) 32{ 33 return false; 34} 35 |
|
31/* 32 * Kernel-internal version of the attrlist cursor. 33 */ 34struct xfs_attrlist_cursor_kern { 35 __u32 hashval; /* hash value of next entry to add */ 36 __u32 blkno; /* block containing entry (suggestion) */ 37 __u32 offset; /* offset in list of equal-hashvals */ 38 __u16 pad1; /* padding to match user-level */ --- 417 unchanged lines hidden (view full) --- 456#define XFS_DAC_LEAF_ADDNAME_INIT 0x02 /* xfs_attr_leaf_addname init*/ 457 458/* 459 * Context used for keeping track of delayed attribute operations 460 */ 461struct xfs_delattr_context { 462 struct xfs_da_args *da_args; 463 | 36/* 37 * Kernel-internal version of the attrlist cursor. 38 */ 39struct xfs_attrlist_cursor_kern { 40 __u32 hashval; /* hash value of next entry to add */ 41 __u32 blkno; /* block containing entry (suggestion) */ 42 __u32 offset; /* offset in list of equal-hashvals */ 43 __u16 pad1; /* padding to match user-level */ --- 417 unchanged lines hidden (view full) --- 461#define XFS_DAC_LEAF_ADDNAME_INIT 0x02 /* xfs_attr_leaf_addname init*/ 462 463/* 464 * Context used for keeping track of delayed attribute operations 465 */ 466struct xfs_delattr_context { 467 struct xfs_da_args *da_args; 468 |
469 /* 470 * Used by xfs_attr_set to hold a leaf buffer across a transaction roll 471 */ 472 struct xfs_buf *leaf_bp; 473 |
|
464 /* Used in xfs_attr_rmtval_set_blk to roll through allocating blocks */ 465 struct xfs_bmbt_irec map; 466 xfs_dablk_t lblkno; 467 int blkcnt; 468 469 /* Used in xfs_attr_node_removename to roll through removing blocks */ 470 struct xfs_da_state *da_state; 471 472 /* Used to keep track of current state of delayed operation */ 473 unsigned int flags; 474 enum xfs_delattr_state dela_state; 475}; 476 | 474 /* Used in xfs_attr_rmtval_set_blk to roll through allocating blocks */ 475 struct xfs_bmbt_irec map; 476 xfs_dablk_t lblkno; 477 int blkcnt; 478 479 /* Used in xfs_attr_node_removename to roll through removing blocks */ 480 struct xfs_da_state *da_state; 481 482 /* Used to keep track of current state of delayed operation */ 483 unsigned int flags; 484 enum xfs_delattr_state dela_state; 485}; 486 |
487/* 488 * List of attrs to commit later. 489 */ 490struct xfs_attr_item { 491 struct xfs_delattr_context xattri_dac; 492 493 /* 494 * Indicates if the attr operation is a set or a remove 495 * XFS_ATTR_OP_FLAGS_{SET,REMOVE} 496 */ 497 unsigned int xattri_op_flags; 498 499 /* used to log this item to an intent */ 500 struct list_head xattri_list; 501}; 502 503 |
|
477/*======================================================================== 478 * Function prototypes for the kernel. 479 *========================================================================*/ 480 481/* 482 * Overall external interface routines. 483 */ 484int xfs_attr_inactive(struct xfs_inode *dp); 485int xfs_attr_list_ilocked(struct xfs_attr_list_context *); 486int xfs_attr_list(struct xfs_attr_list_context *); 487int xfs_inode_hasattr(struct xfs_inode *ip); 488bool xfs_attr_is_leaf(struct xfs_inode *ip); 489int xfs_attr_get_ilocked(struct xfs_da_args *args); 490int xfs_attr_get(struct xfs_da_args *args); 491int xfs_attr_set(struct xfs_da_args *args); 492int xfs_attr_set_args(struct xfs_da_args *args); | 504/*======================================================================== 505 * Function prototypes for the kernel. 506 *========================================================================*/ 507 508/* 509 * Overall external interface routines. 510 */ 511int xfs_attr_inactive(struct xfs_inode *dp); 512int xfs_attr_list_ilocked(struct xfs_attr_list_context *); 513int xfs_attr_list(struct xfs_attr_list_context *); 514int xfs_inode_hasattr(struct xfs_inode *ip); 515bool xfs_attr_is_leaf(struct xfs_inode *ip); 516int xfs_attr_get_ilocked(struct xfs_da_args *args); 517int xfs_attr_get(struct xfs_da_args *args); 518int xfs_attr_set(struct xfs_da_args *args); 519int xfs_attr_set_args(struct xfs_da_args *args); |
520int xfs_attr_set_iter(struct xfs_delattr_context *dac, 521 struct xfs_buf **leaf_bp); |
|
493int xfs_attr_remove_args(struct xfs_da_args *args); 494int xfs_attr_remove_iter(struct xfs_delattr_context *dac); 495bool xfs_attr_namecheck(const void *name, size_t length); 496void xfs_delattr_context_init(struct xfs_delattr_context *dac, 497 struct xfs_da_args *args); | 522int xfs_attr_remove_args(struct xfs_da_args *args); 523int xfs_attr_remove_iter(struct xfs_delattr_context *dac); 524bool xfs_attr_namecheck(const void *name, size_t length); 525void xfs_delattr_context_init(struct xfs_delattr_context *dac, 526 struct xfs_da_args *args); |
527int xfs_attr_calc_size(struct xfs_da_args *args, int *local); |
|
498 | 528 |
529extern struct kmem_cache *xfs_attri_cache; 530extern struct kmem_cache *xfs_attrd_cache; 531 532int __init xfs_attri_init_cache(void); 533void xfs_attri_destroy_cache(void); 534int __init xfs_attrd_init_cache(void); 535void xfs_attrd_destroy_cache(void); 536 |
|
499#endif /* __XFS_ATTR_H__ */ | 537#endif /* __XFS_ATTR_H__ */ |