1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18#ifndef __XFS_DIR2_H__
19#define __XFS_DIR2_H__
20
21struct uio;
22struct xfs_dabuf;
23struct xfs_da_args;
24struct xfs_dir2_put_args;
25struct xfs_bmap_free;
26struct xfs_inode;
27struct xfs_mount;
28struct xfs_trans;
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48typedef __uint16_t xfs_dir2_data_off_t;
49#define NULLDATAOFF 0xffffU
50typedef uint xfs_dir2_data_aoff_t;
51
52
53
54
55typedef __uint32_t xfs_dir2_db_t;
56
57
58
59
60typedef xfs_off_t xfs_dir2_off_t;
61
62extern struct xfs_name xfs_name_dotdot;
63
64
65
66
67extern void xfs_dir_startup(void);
68extern void xfs_dir_mount(struct xfs_mount *mp);
69extern int xfs_dir_isempty(struct xfs_inode *dp);
70extern int xfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp,
71 struct xfs_inode *pdp);
72extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp,
73 struct xfs_name *name, xfs_ino_t inum,
74 xfs_fsblock_t *first,
75 struct xfs_bmap_free *flist, xfs_extlen_t tot);
76extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp,
77 struct xfs_name *name, xfs_ino_t *inum,
78 struct xfs_name *ci_name);
79extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp,
80 struct xfs_name *name, xfs_ino_t ino,
81 xfs_fsblock_t *first,
82 struct xfs_bmap_free *flist, xfs_extlen_t tot);
83extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp,
84 struct xfs_name *name, xfs_ino_t inum,
85 xfs_fsblock_t *first,
86 struct xfs_bmap_free *flist, xfs_extlen_t tot);
87extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp,
88 struct xfs_name *name, uint resblks);
89extern int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino);
90
91
92
93
94extern int xfs_dir2_grow_inode(struct xfs_da_args *args, int space,
95 xfs_dir2_db_t *dbp);
96extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp,
97 int *vp);
98extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp,
99 int *vp);
100extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
101 struct xfs_dabuf *bp);
102
103extern int xfs_dir_cilookup_result(struct xfs_da_args *args, const char *name,
104 int len);
105
106#endif
107