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_dir2.c | |
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_dir2.c')
-rw-r--r-- | fs/xfs/xfs_dir2.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 675899bb7048..3387acd3e471 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c | |||
@@ -46,6 +46,8 @@ | |||
46 | 46 | ||
47 | struct xfs_name xfs_name_dotdot = {"..", 2}; | 47 | struct xfs_name xfs_name_dotdot = {"..", 2}; |
48 | 48 | ||
49 | extern const struct xfs_nameops xfs_default_nameops; | ||
50 | |||
49 | void | 51 | void |
50 | xfs_dir_mount( | 52 | xfs_dir_mount( |
51 | xfs_mount_t *mp) | 53 | xfs_mount_t *mp) |
@@ -173,8 +175,7 @@ xfs_dir_createname( | |||
173 | args.total = total; | 175 | args.total = total; |
174 | args.whichfork = XFS_DATA_FORK; | 176 | args.whichfork = XFS_DATA_FORK; |
175 | args.trans = tp; | 177 | args.trans = tp; |
176 | args.justcheck = 0; | 178 | args.op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT; |
177 | args.addname = args.oknoent = 1; | ||
178 | 179 | ||
179 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) | 180 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) |
180 | rval = xfs_dir2_sf_addname(&args); | 181 | rval = xfs_dir2_sf_addname(&args); |
@@ -215,7 +216,7 @@ xfs_dir_lookup( | |||
215 | args.dp = dp; | 216 | args.dp = dp; |
216 | args.whichfork = XFS_DATA_FORK; | 217 | args.whichfork = XFS_DATA_FORK; |
217 | args.trans = tp; | 218 | args.trans = tp; |
218 | args.oknoent = 1; | 219 | args.op_flags = XFS_DA_OP_OKNOENT; |
219 | args.cmpresult = XFS_CMP_DIFFERENT; | 220 | args.cmpresult = XFS_CMP_DIFFERENT; |
220 | 221 | ||
221 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) | 222 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) |
@@ -267,7 +268,7 @@ xfs_dir_removename( | |||
267 | args.total = total; | 268 | args.total = total; |
268 | args.whichfork = XFS_DATA_FORK; | 269 | args.whichfork = XFS_DATA_FORK; |
269 | args.trans = tp; | 270 | args.trans = tp; |
270 | args.justcheck = args.addname = args.oknoent = 0; | 271 | args.op_flags = 0; |
271 | 272 | ||
272 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) | 273 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) |
273 | rval = xfs_dir2_sf_removename(&args); | 274 | rval = xfs_dir2_sf_removename(&args); |
@@ -350,7 +351,7 @@ xfs_dir_replace( | |||
350 | args.total = total; | 351 | args.total = total; |
351 | args.whichfork = XFS_DATA_FORK; | 352 | args.whichfork = XFS_DATA_FORK; |
352 | args.trans = tp; | 353 | args.trans = tp; |
353 | args.justcheck = args.addname = args.oknoent = 0; | 354 | args.op_flags = 0; |
354 | 355 | ||
355 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) | 356 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) |
356 | rval = xfs_dir2_sf_replace(&args); | 357 | rval = xfs_dir2_sf_replace(&args); |
@@ -394,7 +395,8 @@ xfs_dir_canenter( | |||
394 | args.dp = dp; | 395 | args.dp = dp; |
395 | args.whichfork = XFS_DATA_FORK; | 396 | args.whichfork = XFS_DATA_FORK; |
396 | args.trans = tp; | 397 | args.trans = tp; |
397 | args.justcheck = args.addname = args.oknoent = 1; | 398 | args.op_flags = XFS_DA_OP_JUSTCHECK | XFS_DA_OP_ADDNAME | |
399 | XFS_DA_OP_OKNOENT; | ||
398 | 400 | ||
399 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) | 401 | if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) |
400 | rval = xfs_dir2_sf_addname(&args); | 402 | rval = xfs_dir2_sf_addname(&args); |