diff options
author | Barry Naujok <bnaujok@sgi.com> | 2008-05-21 02:42:05 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:37 -0400 |
commit | 6a178100abf01282eb697ab62b6086b2886dfc00 (patch) | |
tree | 5830f1257fc9662c0f9dcd107eda5377de716a4c /fs/xfs/xfs_da_btree.h | |
parent | 5163f95a08cbf058ae16452c2242c5600fedc32e (diff) |
[XFS] Add op_flags field and helpers to xfs_da_args
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).
SGI-PV: 981520
SGI-Modid: xfs-linux-melb:xfs-kern:31206a
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/xfs_da_btree.h')
-rw-r--r-- | fs/xfs/xfs_da_btree.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h index e64c6924996f..8face64c11fb 100644 --- a/fs/xfs/xfs_da_btree.h +++ b/fs/xfs/xfs_da_btree.h | |||
@@ -132,14 +132,19 @@ typedef struct xfs_da_args { | |||
132 | int index2; /* index of 2nd attr in blk */ | 132 | int index2; /* index of 2nd attr in blk */ |
133 | xfs_dablk_t rmtblkno2; /* remote attr value starting blkno */ | 133 | xfs_dablk_t rmtblkno2; /* remote attr value starting blkno */ |
134 | int rmtblkcnt2; /* remote attr value block count */ | 134 | int rmtblkcnt2; /* remote attr value block count */ |
135 | unsigned char justcheck; /* T/F: check for ok with no space */ | 135 | int op_flags; /* operation flags */ |
136 | unsigned char rename; /* T/F: this is an atomic rename op */ | ||
137 | unsigned char addname; /* T/F: this is an add operation */ | ||
138 | unsigned char oknoent; /* T/F: ok to return ENOENT, else die */ | ||
139 | enum xfs_dacmp cmpresult; /* name compare result for lookups */ | 136 | enum xfs_dacmp cmpresult; /* name compare result for lookups */ |
140 | } xfs_da_args_t; | 137 | } xfs_da_args_t; |
141 | 138 | ||
142 | /* | 139 | /* |
140 | * Operation flags: | ||
141 | */ | ||
142 | #define XFS_DA_OP_JUSTCHECK 0x0001 /* check for ok with no space */ | ||
143 | #define XFS_DA_OP_RENAME 0x0002 /* this is an atomic rename op */ | ||
144 | #define XFS_DA_OP_ADDNAME 0x0004 /* this is an add operation */ | ||
145 | #define XFS_DA_OP_OKNOENT 0x0008 /* lookup/add op, ENOENT ok, else die */ | ||
146 | |||
147 | /* | ||
143 | * Structure to describe buffer(s) for a block. | 148 | * Structure to describe buffer(s) for a block. |
144 | * This is needed in the directory version 2 format case, when | 149 | * This is needed in the directory version 2 format case, when |
145 | * multiple non-contiguous fsblocks might be needed to cover one | 150 | * multiple non-contiguous fsblocks might be needed to cover one |