0001
0002
0003
0004
0005
0006 #ifndef _FS_BFS_BFS_H
0007 #define _FS_BFS_BFS_H
0008
0009 #include <linux/bfs_fs.h>
0010
0011
0012
0013
0014
0015
0016 #define BFS_MAX_LASTI 513
0017
0018
0019
0020
0021 struct bfs_sb_info {
0022 unsigned long si_blocks;
0023 unsigned long si_freeb;
0024 unsigned long si_freei;
0025 unsigned long si_lf_eblk;
0026 unsigned long si_lasti;
0027 DECLARE_BITMAP(si_imap, BFS_MAX_LASTI+1);
0028 struct mutex bfs_lock;
0029 };
0030
0031
0032
0033
0034 struct bfs_inode_info {
0035 unsigned long i_dsk_ino;
0036 unsigned long i_sblock;
0037 unsigned long i_eblock;
0038 struct inode vfs_inode;
0039 };
0040
0041 static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
0042 {
0043 return sb->s_fs_info;
0044 }
0045
0046 static inline struct bfs_inode_info *BFS_I(struct inode *inode)
0047 {
0048 return container_of(inode, struct bfs_inode_info, vfs_inode);
0049 }
0050
0051
0052 #define printf(format, args...) \
0053 printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args)
0054
0055
0056 extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
0057 extern void bfs_dump_imap(const char *, struct super_block *);
0058
0059
0060 extern const struct inode_operations bfs_file_inops;
0061 extern const struct file_operations bfs_file_operations;
0062 extern const struct address_space_operations bfs_aops;
0063
0064
0065 extern const struct inode_operations bfs_dir_inops;
0066 extern const struct file_operations bfs_dir_operations;
0067
0068 #endif