aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_dir2.h27
-rw-r--r--fs/xfs/xfs_dir_sf.h24
2 files changed, 24 insertions, 27 deletions
diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h
index 3158f5dc431f..7dd364b1e038 100644
--- a/fs/xfs/xfs_dir2.h
+++ b/fs/xfs/xfs_dir2.h
@@ -55,16 +55,16 @@ typedef __uint32_t xfs_dir2_db_t;
55/* 55/*
56 * Byte offset in a directory. 56 * Byte offset in a directory.
57 */ 57 */
58typedef xfs_off_t xfs_dir2_off_t; 58typedef xfs_off_t xfs_dir2_off_t;
59 59
60/* 60/*
61 * For getdents, argument struct for put routines. 61 * For getdents, argument struct for put routines.
62 */ 62 */
63typedef int (*xfs_dir2_put_t)(struct xfs_dir2_put_args *pa); 63typedef int (*xfs_dir2_put_t)(struct xfs_dir2_put_args *pa);
64typedef struct xfs_dir2_put_args { 64typedef struct xfs_dir2_put_args {
65 xfs_off_t cook; /* cookie of (next) entry */ 65 xfs_off_t cook; /* cookie of (next) entry */
66 xfs_intino_t ino; /* inode number */ 66 xfs_intino_t ino; /* inode number */
67 struct xfs_dirent *dbp; /* buffer pointer */ 67 xfs_dirent_t *dbp; /* buffer pointer */
68 char *name; /* directory entry name */ 68 char *name; /* directory entry name */
69 int namelen; /* length of name */ 69 int namelen; /* length of name */
70 int done; /* output: set if value was stored */ 70 int done; /* output: set if value was stored */
@@ -75,18 +75,13 @@ typedef struct xfs_dir2_put_args {
75/* 75/*
76 * Other interfaces used by the rest of the dir v2 code. 76 * Other interfaces used by the rest of the dir v2 code.
77 */ 77 */
78extern int 78extern int xfs_dir2_grow_inode(struct xfs_da_args *args, int space,
79 xfs_dir2_grow_inode(struct xfs_da_args *args, int space, 79 xfs_dir2_db_t *dbp);
80 xfs_dir2_db_t *dbp); 80extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp,
81 81 int *vp);
82extern int 82extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp,
83 xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, int *vp); 83 int *vp);
84 84extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
85extern int 85 struct xfs_dabuf *bp);
86 xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, int *vp);
87
88extern int
89 xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
90 struct xfs_dabuf *bp);
91 86
92#endif /* __XFS_DIR2_H__ */ 87#endif /* __XFS_DIR2_H__ */
diff --git a/fs/xfs/xfs_dir_sf.h b/fs/xfs/xfs_dir_sf.h
index fe44c6f4d560..5b20b4d3f57d 100644
--- a/fs/xfs/xfs_dir_sf.h
+++ b/fs/xfs/xfs_dir_sf.h
@@ -35,19 +35,21 @@ typedef struct { __uint8_t i[sizeof(xfs_ino_t)]; } xfs_dir_ino_t;
35 * and the elements much be memcpy'd out into a work area to get correct 35 * and the elements much be memcpy'd out into a work area to get correct
36 * alignment for the inode number fields. 36 * alignment for the inode number fields.
37 */ 37 */
38typedef struct xfs_dir_sf_hdr { /* constant-structure header block */
39 xfs_dir_ino_t parent; /* parent dir inode number */
40 __uint8_t count; /* count of active entries */
41} xfs_dir_sf_hdr_t;
42
43typedef struct xfs_dir_sf_entry {
44 xfs_dir_ino_t inumber; /* referenced inode number */
45 __uint8_t namelen; /* actual length of name (no NULL) */
46 __uint8_t name[1]; /* name */
47} xfs_dir_sf_entry_t;
48
38typedef struct xfs_dir_shortform { 49typedef struct xfs_dir_shortform {
39 struct xfs_dir_sf_hdr { /* constant-structure header block */ 50 xfs_dir_sf_hdr_t hdr;
40 xfs_dir_ino_t parent; /* parent dir inode number */ 51 xfs_dir_sf_entry_t list[1]; /* variable sized array */
41 __uint8_t count; /* count of active entries */
42 } hdr;
43 struct xfs_dir_sf_entry {
44 xfs_dir_ino_t inumber; /* referenced inode number */
45 __uint8_t namelen; /* actual length of name (no NULL) */
46 __uint8_t name[1]; /* name */
47 } list[1]; /* variable sized array */
48} xfs_dir_shortform_t; 52} xfs_dir_shortform_t;
49typedef struct xfs_dir_sf_hdr xfs_dir_sf_hdr_t;
50typedef struct xfs_dir_sf_entry xfs_dir_sf_entry_t;
51 53
52/* 54/*
53 * We generate this then sort it, so that readdirs are returned in 55 * We generate this then sort it, so that readdirs are returned in