1 /* SPDX-License-Identifier: GPL-2.0-or-later 2 * 3 * Copyright (C) 2022 Oracle. All Rights Reserved. 4 * Author: Allison Henderson <allison.henderson@oracle.com> 5 */ 6 #ifndef __XFS_ATTR_ITEM_H__ 7 #define __XFS_ATTR_ITEM_H__ 8 9 /* kernel only ATTRI/ATTRD definitions */ 10 11 struct xfs_mount; 12 struct kmem_zone; 13 14 /* 15 * This is the "attr intention" log item. It is used to log the fact that some 16 * extended attribute operations need to be processed. An operation is 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. 19 * 20 * During a normal attr operation, name and value point to the name and value 21 * fields of the caller's xfs_da_args structure. During a recovery, the name 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. 25 */ 26 struct xfs_attri_log_item { 27 struct xfs_log_item attri_item; 28 atomic_t attri_refcount; 29 int attri_name_len; 30 int attri_value_len; 31 void *attri_name; 32 void *attri_value; 33 struct xfs_attri_log_format attri_format; 34 }; 35 36 /* 37 * This is the "attr done" log item. It is used to log the fact that some attrs 38 * earlier mentioned in an attri item have been freed. 39 */ 40 struct xfs_attrd_log_item { 41 struct xfs_log_item attrd_item; 42 struct xfs_attri_log_item *attrd_attrip; 43 struct xfs_attrd_log_format attrd_format; 44 }; 45 46 #endif /* __XFS_ATTR_ITEM_H__ */ 47