]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * fs/bfs/bfs.h | |
3 | * Copyright (C) 1999 Tigran Aivazian <[email protected]> | |
4 | */ | |
5 | #ifndef _FS_BFS_BFS_H | |
6 | #define _FS_BFS_BFS_H | |
7 | ||
8 | #include <linux/bfs_fs.h> | |
9 | ||
10 | /* | |
11 | * BFS file system in-core superblock info | |
12 | */ | |
13 | struct bfs_sb_info { | |
14 | unsigned long si_blocks; | |
15 | unsigned long si_freeb; | |
16 | unsigned long si_freei; | |
1da177e4 LT |
17 | unsigned long si_lf_eblk; |
18 | unsigned long si_lasti; | |
75b25b4c | 19 | unsigned long *si_imap; |
3f165e4c | 20 | struct mutex bfs_lock; |
1da177e4 LT |
21 | }; |
22 | ||
23 | /* | |
24 | * BFS file system in-core inode info | |
25 | */ | |
26 | struct bfs_inode_info { | |
27 | unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */ | |
28 | unsigned long i_sblock; | |
29 | unsigned long i_eblock; | |
30 | struct inode vfs_inode; | |
31 | }; | |
32 | ||
33 | static inline struct bfs_sb_info *BFS_SB(struct super_block *sb) | |
34 | { | |
35 | return sb->s_fs_info; | |
36 | } | |
37 | ||
38 | static inline struct bfs_inode_info *BFS_I(struct inode *inode) | |
39 | { | |
f433dc56 | 40 | return container_of(inode, struct bfs_inode_info, vfs_inode); |
1da177e4 LT |
41 | } |
42 | ||
43 | ||
44 | #define printf(format, args...) \ | |
8e24eea7 | 45 | printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args) |
1da177e4 | 46 | |
e33ab086 DH |
47 | /* inode.c */ |
48 | extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino); | |
1da177e4 LT |
49 | |
50 | /* file.c */ | |
754661f1 | 51 | extern const struct inode_operations bfs_file_inops; |
4b6f5d20 | 52 | extern const struct file_operations bfs_file_operations; |
f5e54d6e | 53 | extern const struct address_space_operations bfs_aops; |
1da177e4 LT |
54 | |
55 | /* dir.c */ | |
754661f1 | 56 | extern const struct inode_operations bfs_dir_inops; |
4b6f5d20 | 57 | extern const struct file_operations bfs_dir_operations; |
1da177e4 LT |
58 | |
59 | #endif /* _FS_BFS_BFS_H */ |