aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr_leaf.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_attr_leaf.h')
-rw-r--r--fs/xfs/xfs_attr_leaf.h41
1 files changed, 32 insertions, 9 deletions
diff --git a/fs/xfs/xfs_attr_leaf.h b/fs/xfs/xfs_attr_leaf.h
index 51c3ee156b2f..040f732ce1e2 100644
--- a/fs/xfs/xfs_attr_leaf.h
+++ b/fs/xfs/xfs_attr_leaf.h
@@ -130,6 +130,19 @@ typedef struct xfs_attr_leafblock {
130#define XFS_ATTR_INCOMPLETE (1 << XFS_ATTR_INCOMPLETE_BIT) 130#define XFS_ATTR_INCOMPLETE (1 << XFS_ATTR_INCOMPLETE_BIT)
131 131
132/* 132/*
133 * Conversion macros for converting namespace bits from argument flags
134 * to ondisk flags.
135 */
136#define XFS_ATTR_NSP_ARGS_MASK (ATTR_ROOT | ATTR_SECURE)
137#define XFS_ATTR_NSP_ONDISK_MASK (XFS_ATTR_ROOT | XFS_ATTR_SECURE)
138#define XFS_ATTR_NSP_ONDISK(flags) ((flags) & XFS_ATTR_NSP_ONDISK_MASK)
139#define XFS_ATTR_NSP_ARGS(flags) ((flags) & XFS_ATTR_NSP_ARGS_MASK)
140#define XFS_ATTR_NSP_ARGS_TO_ONDISK(x) (((x) & ATTR_ROOT ? XFS_ATTR_ROOT : 0) |\
141 ((x) & ATTR_SECURE ? XFS_ATTR_SECURE : 0))
142#define XFS_ATTR_NSP_ONDISK_TO_ARGS(x) (((x) & XFS_ATTR_ROOT ? ATTR_ROOT : 0) |\
143 ((x) & XFS_ATTR_SECURE ? ATTR_SECURE : 0))
144
145/*
133 * Alignment for namelist and valuelist entries (since they are mixed 146 * Alignment for namelist and valuelist entries (since they are mixed
134 * there can be only one alignment value) 147 * there can be only one alignment value)
135 */ 148 */
@@ -196,16 +209,26 @@ static inline int xfs_attr_leaf_entsize_local_max(int bsize)
196 * Structure used to pass context around among the routines. 209 * Structure used to pass context around among the routines.
197 *========================================================================*/ 210 *========================================================================*/
198 211
212
213struct xfs_attr_list_context;
214
215typedef int (*put_listent_func_t)(struct xfs_attr_list_context *, struct attrnames *,
216 char *, int, int, char *);
217
199typedef struct xfs_attr_list_context { 218typedef struct xfs_attr_list_context {
200 struct xfs_inode *dp; /* inode */ 219 struct xfs_inode *dp; /* inode */
201 struct attrlist_cursor_kern *cursor;/* position in list */ 220 struct attrlist_cursor_kern *cursor; /* position in list */
202 struct attrlist *alist; /* output buffer */ 221 struct attrlist *alist; /* output buffer */
203 int count; /* num used entries */ 222 int seen_enough; /* T/F: seen enough of list? */
204 int dupcnt; /* count dup hashvals seen */ 223 int count; /* num used entries */
205 int bufsize;/* total buffer size */ 224 int dupcnt; /* count dup hashvals seen */
206 int firstu; /* first used byte in buffer */ 225 int bufsize; /* total buffer size */
207 int flags; /* from VOP call */ 226 int firstu; /* first used byte in buffer */
208 int resynch;/* T/F: resynch with cursor */ 227 int flags; /* from VOP call */
228 int resynch; /* T/F: resynch with cursor */
229 int put_value; /* T/F: need value for listent */
230 put_listent_func_t put_listent; /* list output fmt function */
231 int index; /* index into output buffer */
209} xfs_attr_list_context_t; 232} xfs_attr_list_context_t;
210 233
211/* 234/*