1 #ifndef _VTREEFS_PROTO_H
2 #define _VTREEFS_PROTO_H
5 int init_extra(unsigned int inodes
, size_t inode_extra
);
6 void clear_inode_extra(struct inode
*node
);
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
,
13 ssize_t
fs_write(ino_t ino_nr
, struct fsdriver_data
*data
, size_t bytes
,
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
,
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
);
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
,
37 int fs_unlink(ino_t dir_nr
, char *name
, int call
);
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);
45 void fs_other(const message
*m_ptr
, int ipc_status
);
48 int fs_lookup(ino_t dir_nr
, char *name
, struct fsdriver_node
*node
,
52 long sdbm_hash(const char *str
, int len
);
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
);
60 #endif /* _VTREEFS_PROTO_H */