The end of the xfs_da_args structure has 4 unsigned char fields for
true/false information on directory and attr operations using the
xfs_da_args structure.
The following converts these 4 into a op_flags field that uses the
first 4 bits for these fields and allows expansion for future
operation information (eg. case-insensitive lookup request).
There is also a bit of EOL whitespace cleanup too.
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
---
fs/xfs/xfs_attr.c | 11 ++++------
fs/xfs/xfs_attr_leaf.c | 52 ++++++++++++++++++++++++------------------------
fs/xfs/xfs_da_btree.c | 2 -
fs/xfs/xfs_da_btree.h | 33 ++++++++++++++++++++++++++----
fs/xfs/xfs_dir2.c | 12 +++++------
fs/xfs/xfs_dir2_block.c | 10 ++++-----
fs/xfs/xfs_dir2_leaf.c | 6 ++---
fs/xfs/xfs_dir2_node.c | 15 +++++++------
fs/xfs/xfs_dir2_sf.c | 8 +++----
fs/xfs/xfs_dir2_trace.c | 19 +++++++++--------
fs/xfs/xfsidbg.c | 13 ++++++------
11 files changed, 105 insertions(+), 76 deletions(-)
Index: kern_ci/fs/xfs/xfs_attr.c
===================================================================
--- kern_ci.orig/fs/xfs/xfs_attr.c
+++ kern_ci/fs/xfs/xfs_attr.c
@@ -241,8 +241,7 @@ xfs_attr_set_int(xfs_inode_t *dp, struct
args.firstblock = &firstblock;
args.flist = &flist;
args.whichfork = XFS_ATTR_FORK;
- args.addname = 1;
- args.oknoent = 1;
+ args.op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT;
/*
* Determine space new attribute will use, and if it would be
@@ -974,7 +973,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *arg
xfs_da_brelse(args->trans, bp);
return(retval);
}
- args->rename = 1; /* an atomic rename */
+ args->op_flags |= XFS_DA_OP_RENAME; /* an atomic rename */
args->blkno2 = args->blkno; /* set 2nd entry info*/
args->index2 = args->index;
args->rmtblkno2 = args->rmtblkno;
@@ -1054,7 +1053,7 @@ xfs_attr_leaf_addname(xfs_da_args_t *arg
* so that one dis...