diff options
Diffstat (limited to 'fs/xfs/xfs_dir2.h')
-rw-r--r-- | fs/xfs/xfs_dir2.h | 54 |
1 files changed, 4 insertions, 50 deletions
diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h index 74a3b1057685..e937d9991c18 100644 --- a/fs/xfs/xfs_dir2.h +++ b/fs/xfs/xfs_dir2.h | |||
@@ -16,49 +16,14 @@ | |||
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ | 17 | */ |
18 | #ifndef __XFS_DIR2_H__ | 18 | #ifndef __XFS_DIR2_H__ |
19 | #define __XFS_DIR2_H__ | 19 | #define __XFS_DIR2_H__ |
20 | 20 | ||
21 | struct uio; | ||
22 | struct xfs_dabuf; | ||
23 | struct xfs_da_args; | ||
24 | struct xfs_dir2_put_args; | ||
25 | struct xfs_bmap_free; | 21 | struct xfs_bmap_free; |
22 | struct xfs_da_args; | ||
26 | struct xfs_inode; | 23 | struct xfs_inode; |
27 | struct xfs_mount; | 24 | struct xfs_mount; |
28 | struct xfs_trans; | 25 | struct xfs_trans; |
29 | 26 | ||
30 | /* | ||
31 | * Directory version 2. | ||
32 | * There are 4 possible formats: | ||
33 | * shortform | ||
34 | * single block - data with embedded leaf at the end | ||
35 | * multiple data blocks, single leaf+freeindex block | ||
36 | * data blocks, node&leaf blocks (btree), freeindex blocks | ||
37 | * | ||
38 | * The shortform format is in xfs_dir2_sf.h. | ||
39 | * The single block format is in xfs_dir2_block.h. | ||
40 | * The data block format is in xfs_dir2_data.h. | ||
41 | * The leaf and freeindex block formats are in xfs_dir2_leaf.h. | ||
42 | * Node blocks are the same as the other version, in xfs_da_btree.h. | ||
43 | */ | ||
44 | |||
45 | /* | ||
46 | * Byte offset in data block and shortform entry. | ||
47 | */ | ||
48 | typedef __uint16_t xfs_dir2_data_off_t; | ||
49 | #define NULLDATAOFF 0xffffU | ||
50 | typedef uint xfs_dir2_data_aoff_t; /* argument form */ | ||
51 | |||
52 | /* | ||
53 | * Directory block number (logical dirblk in file) | ||
54 | */ | ||
55 | typedef __uint32_t xfs_dir2_db_t; | ||
56 | |||
57 | /* | ||
58 | * Byte offset in a directory. | ||
59 | */ | ||
60 | typedef xfs_off_t xfs_dir2_off_t; | ||
61 | |||
62 | extern struct xfs_name xfs_name_dotdot; | 27 | extern struct xfs_name xfs_name_dotdot; |
63 | 28 | ||
64 | /* | 29 | /* |
@@ -86,21 +51,10 @@ extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp, | |||
86 | struct xfs_bmap_free *flist, xfs_extlen_t tot); | 51 | struct xfs_bmap_free *flist, xfs_extlen_t tot); |
87 | extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp, | 52 | extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp, |
88 | struct xfs_name *name, uint resblks); | 53 | struct xfs_name *name, uint resblks); |
89 | extern int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); | ||
90 | 54 | ||
91 | /* | 55 | /* |
92 | * Utility routines for v2 directories. | 56 | * Direct call from the bmap code, bypassing the generic directory layer. |
93 | */ | 57 | */ |
94 | extern int xfs_dir2_grow_inode(struct xfs_da_args *args, int space, | 58 | extern int xfs_dir2_sf_to_block(struct xfs_da_args *args); |
95 | xfs_dir2_db_t *dbp); | ||
96 | extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, | ||
97 | int *vp); | ||
98 | extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, | ||
99 | int *vp); | ||
100 | extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db, | ||
101 | struct xfs_dabuf *bp); | ||
102 | |||
103 | extern int xfs_dir_cilookup_result(struct xfs_da_args *args, | ||
104 | const unsigned char *name, int len); | ||
105 | 59 | ||
106 | #endif /* __XFS_DIR2_H__ */ | 60 | #endif /* __XFS_DIR2_H__ */ |