1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 struct buf;
38 struct fid;
39 struct m_ext2fs;
40 struct inode;
41 struct mount;
42 struct nameidata;
43 struct proc;
44 struct statfs;
45 struct timeval;
46 struct ucred;
47 struct ufsmount;
48 struct uio;
49 struct vnode;
50 struct vfsconf;
51 struct mbuf;
52 struct componentname;
53
54 extern struct pool ext2fs_inode_pool;
55 extern struct pool ext2fs_dinode_pool;
56
57 __BEGIN_DECLS
58
59
60 int ext2fs_alloc(struct inode *, int32_t, int32_t , struct ucred *,
61 int32_t *);
62 int ext2fs_realloccg(struct inode *, int32_t, int32_t, int, int,
63 struct ucred *, struct buf **);
64 int ext2fs_reallocblks(void *);
65 int ext2fs_inode_alloc(struct inode *pip, mode_t mode, struct ucred *,
66 struct vnode **);
67 daddr_t ext2fs_blkpref(struct inode *, int32_t, int, int32_t *);
68 void ext2fs_blkfree(struct inode *, int32_t);
69 int ext2fs_inode_free(struct inode *pip, ino_t ino, mode_t mode);
70
71
72 int ext2fs_buf_alloc(struct inode *, daddr_t, int, struct ucred *,
73 struct buf **, int);
74
75
76 int ext2fs_bmap(void *);
77
78
79 int ext2fs_init(struct vfsconf *);
80 u_int64_t ext2fs_size(struct inode *);
81 int ext2fs_setsize(struct inode *, u_int64_t);
82 int ext2fs_update(struct inode *ip, struct timespec *atime,
83 struct timespec *mtime, int waitfor);
84 int ext2fs_truncate(struct inode *, off_t, int, struct ucred *);
85 int ext2fs_inactive(void *);
86
87
88 int ext2fs_readdir(void *);
89 int ext2fs_lookup(void *);
90 int ext2fs_direnter(struct inode *, struct vnode *,
91 struct componentname *);
92 int ext2fs_dirremove(struct vnode *, struct componentname *);
93 int ext2fs_dirrewrite(struct inode *, struct inode *,
94 struct componentname *);
95 int ext2fs_dirempty(struct inode *, ino_t, struct ucred *);
96 int ext2fs_checkpath(struct inode *, struct inode *, struct ucred *);
97
98
99 int ext2fs_bufatoff(struct inode *, off_t, char **, struct buf **);
100 int ext2fs_vinit(struct mount *, int (**)(void *), int (**)(void *),
101 struct vnode **);
102 void ext2fs_fragacct(struct m_ext2fs *, int, int32_t[], int);
103 #ifdef DIAGNOSTIC
104 void ext2fs_checkoverlap(struct buf *, struct inode *);
105 #endif
106
107
108 int ext2fs_mountroot(void);
109 int ext2fs_mount(struct mount *, const char *, void *,
110 struct nameidata *, struct proc *);
111 int ext2fs_reload(struct mount *, struct ucred *, struct proc *);
112 int ext2fs_mountfs(struct vnode *, struct mount *, struct proc *);
113 int ext2fs_unmount(struct mount *, int, struct proc *);
114 int ext2fs_flushfiles(struct mount *, int, struct proc *);
115 int ext2fs_statfs(struct mount *, struct statfs *, struct proc *);
116 int ext2fs_sync(struct mount *, int, struct ucred *, struct proc *);
117 int ext2fs_vget(struct mount *, ino_t, struct vnode **);
118 int ext2fs_fhtovp(struct mount *, struct fid *, struct vnode **);
119 int ext2fs_vptofh(struct vnode *, struct fid *);
120 int ext2fs_sbupdate(struct ufsmount *, int);
121 int ext2fs_cgupdate(struct ufsmount *, int);
122 int ext2fs_sysctl(int *, u_int, void *, size_t *, void *, size_t,
123 struct proc *);
124
125
126 int ext2fs_read(void *);
127 int ext2fs_write(void *);
128
129
130 int ext2fs_create(void *);
131 int ext2fs_mknod(void *);
132 int ext2fs_open(void *);
133 int ext2fs_access(void *);
134 int ext2fs_getattr(void *);
135 int ext2fs_setattr(void *);
136 int ext2fs_remove(void *);
137 int ext2fs_link(void *);
138 int ext2fs_rename(void *);
139 int ext2fs_mkdir(void *);
140 int ext2fs_rmdir(void *);
141 int ext2fs_symlink(void *);
142 int ext2fs_readlink(void *);
143 int ext2fs_advlock(void *);
144 int ext2fs_makeinode(int, struct vnode *, struct vnode **,
145 struct componentname *cnp);
146 int ext2fs_fsync(void *);
147 int ext2fs_reclaim(void *);
148 int ext2fsfifo_reclaim(void *);
149
150 __END_DECLS
151
152 #define IS_EXT2_VNODE(vp) (vp->v_tag == VT_EXT2FS)
153
154 extern int (**ext2fs_vnodeop_p)(void *);
155 extern int (**ext2fs_specop_p)(void *);
156 #ifdef FIFO
157 extern int (**ext2fs_fifoop_p)(void *);
158 #define EXT2FS_FIFOOPS ext2fs_fifoop_p
159 #else
160 #define EXT2FS_FIFOOPS NULL
161 #endif