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_block.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_block.c')
-rw-r--r-- | fs/xfs/xfs_dir2_block.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index 98588491cb0e..dee225918db2 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c | |||
@@ -215,7 +215,7 @@ xfs_dir2_block_addname( | |||
215 | /* | 215 | /* |
216 | * If this isn't a real add, we're done with the buffer. | 216 | * If this isn't a real add, we're done with the buffer. |
217 | */ | 217 | */ |
218 | if (args->justcheck) | 218 | if (args->op_flags & XFS_DA_OP_JUSTCHECK) |
219 | xfs_da_brelse(tp, bp); | 219 | xfs_da_brelse(tp, bp); |
220 | /* | 220 | /* |
221 | * If we don't have space for the new entry & leaf ... | 221 | * If we don't have space for the new entry & leaf ... |
@@ -225,7 +225,7 @@ xfs_dir2_block_addname( | |||
225 | * Not trying to actually do anything, or don't have | 225 | * Not trying to actually do anything, or don't have |
226 | * a space reservation: return no-space. | 226 | * a space reservation: return no-space. |
227 | */ | 227 | */ |
228 | if (args->justcheck || args->total == 0) | 228 | if ((args->op_flags & XFS_DA_OP_JUSTCHECK) || args->total == 0) |
229 | return XFS_ERROR(ENOSPC); | 229 | return XFS_ERROR(ENOSPC); |
230 | /* | 230 | /* |
231 | * Convert to the next larger format. | 231 | * Convert to the next larger format. |
@@ -240,7 +240,7 @@ xfs_dir2_block_addname( | |||
240 | /* | 240 | /* |
241 | * Just checking, and it would work, so say so. | 241 | * Just checking, and it would work, so say so. |
242 | */ | 242 | */ |
243 | if (args->justcheck) | 243 | if (args->op_flags & XFS_DA_OP_JUSTCHECK) |
244 | return 0; | 244 | return 0; |
245 | needlog = needscan = 0; | 245 | needlog = needscan = 0; |
246 | /* | 246 | /* |
@@ -674,7 +674,7 @@ xfs_dir2_block_lookup_int( | |||
674 | else | 674 | else |
675 | high = mid - 1; | 675 | high = mid - 1; |
676 | if (low > high) { | 676 | if (low > high) { |
677 | ASSERT(args->oknoent); | 677 | ASSERT(args->op_flags & XFS_DA_OP_OKNOENT); |
678 | xfs_da_brelse(tp, bp); | 678 | xfs_da_brelse(tp, bp); |
679 | return XFS_ERROR(ENOENT); | 679 | return XFS_ERROR(ENOENT); |
680 | } | 680 | } |
@@ -713,7 +713,7 @@ xfs_dir2_block_lookup_int( | |||
713 | } while (++mid < be32_to_cpu(btp->count) && | 713 | } while (++mid < be32_to_cpu(btp->count) && |
714 | be32_to_cpu(blp[mid].hashval) == hash); | 714 | be32_to_cpu(blp[mid].hashval) == hash); |
715 | 715 | ||
716 | ASSERT(args->oknoent); | 716 | ASSERT(args->op_flags & XFS_DA_OP_OKNOENT); |
717 | /* | 717 | /* |
718 | * Here, we can only be doing a lookup (not a rename or replace). | 718 | * Here, we can only be doing a lookup (not a rename or replace). |
719 | * If a case-insensitive match was found earlier, return success. | 719 | * If a case-insensitive match was found earlier, return success. |