aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2.c
diff options
context:
space:
mode:
authorBarry Naujok <bnaujok@sgi.com>2008-05-21 02:42:05 -0400
committerNiv Sardi <xaiki@debian.org>2008-07-28 02:58:37 -0400
commit6a178100abf01282eb697ab62b6086b2886dfc00 (patch)
tree5830f1257fc9662c0f9dcd107eda5377de716a4c /fs/xfs/xfs_dir2.c
parent5163f95a08cbf058ae16452c2242c5600fedc32e (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.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index 675899bb704..3387acd3e47 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -46,6 +46,8 @@
46 46
47struct xfs_name xfs_name_dotdot = {"..", 2}; 47struct xfs_name xfs_name_dotdot = {"..", 2};
48 48
49extern const struct xfs_nameops xfs_default_nameops;
50
49void 51void
50xfs_dir_mount( 52xfs_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);