4 #define put_block(n) lmfs_put_block(n)
6 /* Function prototypes. */
8 /* Structs used in prototypes must be declared as such first. */
15 void discard_preallocated_blocks(struct inode
*rip
);
16 block_t
alloc_block(struct inode
*rip
, block_t goal
);
17 void free_block(struct super_block
*sp
, bit_t bit
);
20 struct inode
*alloc_inode(struct inode
*parent
, mode_t bits
, uid_t uid
,
22 void free_inode(struct inode
*rip
);
25 void dup_inode(struct inode
*ip
);
26 struct inode
*find_inode(dev_t dev
, ino_t numb
);
27 int fs_putnode(ino_t ino_nr
, unsigned int count
);
28 void init_inode_cache(void);
29 struct inode
*get_inode(dev_t dev
, ino_t numb
);
30 void put_inode(struct inode
*rip
);
31 void update_times(struct inode
*rip
);
32 void rw_inode(struct inode
*rip
, int rw_flag
);
35 int fs_trunc(ino_t ino_nr
, off_t start
, off_t end
);
36 int fs_link(ino_t dir_nr
, char *name
, ino_t ino_nr
);
37 int fs_rdlink(ino_t ino_nr
, struct fsdriver_data
*data
, size_t bytes
);
38 int fs_rename(ino_t old_dir_nr
, char *old_name
, ino_t new_dir_nr
,
40 int fs_unlink(ino_t dir_nr
, char *name
, int call
);
41 int truncate_inode(struct inode
*rip
, off_t len
);
47 int fs_mount(dev_t dev
, unsigned int flags
, struct fsdriver_node
*root_node
,
48 unsigned int *res_flags
);
49 void fs_unmount(void);
50 int fs_mountpt(ino_t ino_nr
);
53 int fs_create(ino_t dir_nr
, char *name
, mode_t mode
, uid_t uid
, gid_t gid
,
54 struct fsdriver_node
*node
);
55 int fs_mkdir(ino_t dir_nr
, char *name
, mode_t mode
, uid_t uid
, gid_t gid
);
56 int fs_mknod(ino_t dir_nr
, char *name
, mode_t mode
, uid_t uid
, gid_t gid
,
58 int fs_slink(ino_t dir_nr
, char *name
, uid_t uid
, gid_t gid
,
59 struct fsdriver_data
*data
, size_t bytes
);
60 void fs_seek(ino_t ino_nr
);
63 int fs_lookup(ino_t dir_nr
, char *name
, struct fsdriver_node
*node
,
65 struct inode
*advance(struct inode
*dirp
, const char *string
);
66 int search_dir(struct inode
*ldir_ptr
, const char *string
, ino_t
*numb
,
70 int fs_chmod(ino_t ino_nr
, mode_t
*mode
);
71 int fs_chown(ino_t ino_nr
, uid_t uid
, gid_t gid
, mode_t
*mode
);
74 ssize_t
fs_readwrite(ino_t ino_nr
, struct fsdriver_data
*data
, size_t bytes
,
76 block_t
rd_indir(struct buf
*bp
, int index
);
77 block_t
read_map(struct inode
*rip
, off_t pos
, int opportunistic
);
78 struct buf
*get_block_map(register struct inode
*rip
, u64_t position
);
79 ssize_t
fs_getdents(ino_t ino_nr
, struct fsdriver_data
*data
, size_t bytes
,
83 int fs_stat(ino_t ino_nr
, struct stat
*statbuf
);
84 int fs_statvfs(struct statvfs
*st
);
87 unsigned int get_block_size(dev_t dev
);
88 struct super_block
*get_super(dev_t dev
);
89 int read_super(struct super_block
*sp
);
90 void write_super(struct super_block
*sp
);
91 struct group_desc
* get_group_desc(unsigned int bnum
);
94 int fs_utime(ino_t ino
, struct timespec
*atime
, struct timespec
*mtime
);
97 struct buf
*get_block(dev_t dev
, block_t block
, int how
);
98 unsigned conv2(int norm
, int w
);
99 long conv4(int norm
, long x
);
100 int ansi_strcmp(register const char* ansi_s
, register const char *s2
,
101 register size_t ansi_s_length
);
102 bit_t
setbit(bitchunk_t
*bitmap
, bit_t max_bits
, unsigned int word
);
103 bit_t
setbyte(bitchunk_t
*bitmap
, bit_t max_bits
);
104 int unsetbit(bitchunk_t
*bitmap
, bit_t bit
);
107 struct buf
*new_block(struct inode
*rip
, off_t position
);
108 void zero_block(struct buf
*bp
);
109 int write_map(struct inode
*, off_t
, block_t
, int);
111 #endif /* EXT2_PROTO_H */