Commit | Line | Data |
---|---|---|
fd920008 AH |
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 | ||
4183e4f2 DW |
14 | struct xfs_attri_log_nameval { |
15 | struct xfs_log_iovec name; | |
16 | struct xfs_log_iovec value; | |
17 | refcount_t refcount; | |
18 | ||
19 | /* name and value follow the end of this struct */ | |
20 | }; | |
21 | ||
fd920008 AH |
22 | /* |
23 | * This is the "attr intention" log item. It is used to log the fact that some | |
24 | * extended attribute operations need to be processed. An operation is | |
25 | * currently either a set or remove. Set or remove operations are described by | |
e3c5de22 | 26 | * the xfs_attr_intent which may be logged to this intent. |
fd920008 AH |
27 | * |
28 | * During a normal attr operation, name and value point to the name and value | |
29 | * fields of the caller's xfs_da_args structure. During a recovery, the name | |
30 | * and value buffers are copied from the log, and stored in a trailing buffer | |
e3c5de22 DW |
31 | * attached to the xfs_attr_intent until they are committed. They are freed |
32 | * when the xfs_attr_intent itself is freed when the work is done. | |
fd920008 AH |
33 | */ |
34 | struct xfs_attri_log_item { | |
35 | struct xfs_log_item attri_item; | |
36 | atomic_t attri_refcount; | |
4183e4f2 | 37 | struct xfs_attri_log_nameval *attri_nameval; |
fd920008 AH |
38 | struct xfs_attri_log_format attri_format; |
39 | }; | |
40 | ||
41 | /* | |
42 | * This is the "attr done" log item. It is used to log the fact that some attrs | |
43 | * earlier mentioned in an attri item have been freed. | |
44 | */ | |
45 | struct xfs_attrd_log_item { | |
46 | struct xfs_log_item attrd_item; | |
47 | struct xfs_attri_log_item *attrd_attrip; | |
48 | struct xfs_attrd_log_format attrd_format; | |
49 | }; | |
50 | ||
4136e38a DW |
51 | extern struct kmem_cache *xfs_attri_cache; |
52 | extern struct kmem_cache *xfs_attrd_cache; | |
53 | ||
fd920008 | 54 | #endif /* __XFS_ATTR_ITEM_H__ */ |