1 #ifndef _VTREEFS_PROTO_H 2 #define _VTREEFS_PROTO_H 3 4 /* extra.c */ 5 int init_extra(unsigned int inodes, size_t inode_extra); 6 void clear_inode_extra(struct inode *node); 7 8 /* file.c */ 9 int init_buf(size_t size); 10 void cleanup_buf(void); 11 ssize_t fs_read(ino_t ino_nr, struct fsdriver_data *data, size_t bytes, 12 off_t pos, int call); 13 ssize_t fs_write(ino_t ino_nr, struct fsdriver_data *data, size_t bytes, 14 off_t pos, int call); 15 int fs_trunc(ino_t ino_nr, off_t start_pos, off_t end_pos); 16 ssize_t fs_getdents(ino_t ino_nr, struct fsdriver_data *data, size_t bytes, 17 off_t *pos); 18 19 /* inode.c */ 20 int init_inodes(unsigned int inodes, struct inode_stat *stat, 21 index_t nr_indexed_entries); 22 void cleanup_inodes(void); 23 struct inode *find_inode(ino_t num); 24 struct inode *get_inode(ino_t num); 25 void put_inode(struct inode *node); 26 void ref_inode(struct inode *node); 27 int get_inode_number(const struct inode *node); 28 int is_inode_deleted(const struct inode *node); 29 int fs_putnode(ino_t ino_nr, unsigned int count); 30 31 /* link.c */ 32 ssize_t fs_rdlink(ino_t ino_nr, struct fsdriver_data *data, size_t bytes); 33 int fs_slink(ino_t dir_nr, char *name, uid_t uid, gid_t gid, 34 struct fsdriver_data *data, size_t bytes); 35 int fs_mknod(ino_t dir_nr, char *name, mode_t mode, uid_t uid, gid_t gid, 36 dev_t rdev); 37 int fs_unlink(ino_t dir_nr, char *name, int call); 38 39 /* mount.c */ 40 int fs_mount(dev_t dev, unsigned int flags, struct fsdriver_node *root_node, 41 unsigned int *res_flags); 42 void fs_unmount(void); 43 44 /* main.c */ 45 void fs_other(const message *m_ptr, int ipc_status); 46 47 /* path.c */ 48 int fs_lookup(ino_t dir_nr, char *name, struct fsdriver_node *node, 49 int *is_mountpt); 50 51 /* sdbm.c */ 52 long sdbm_hash(const char *str, int len); 53 54 /* stadir.c */ 55 int fs_stat(ino_t ino_nr, struct stat *buf); 56 int fs_chmod(ino_t ino_nr, mode_t *mode); 57 int fs_chown(ino_t ino_nr, uid_t uid, gid_t gid, mode_t *mode); 58 int fs_statvfs(struct statvfs *buf); 59 60 #endif /* _VTREEFS_PROTO_H */ 61