Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * fs/bfs/bfs.h |
| 3 | * Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com> |
| 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; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | unsigned long si_lf_eblk; |
| 18 | unsigned long si_lasti; |
Dmitri Vorobiev | 75b25b4 | 2008-07-25 19:44:52 -0700 | [diff] [blame] | 19 | unsigned long *si_imap; |
| 20 | struct buffer_head *si_sbh; /* buffer header w/superblock */ |
Dmitri Vorobiev | 3f165e4 | 2008-07-25 19:44:54 -0700 | [diff] [blame] | 21 | struct mutex bfs_lock; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | /* |
| 25 | * BFS file system in-core inode info |
| 26 | */ |
| 27 | struct bfs_inode_info { |
| 28 | unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */ |
| 29 | unsigned long i_sblock; |
| 30 | unsigned long i_eblock; |
| 31 | struct inode vfs_inode; |
| 32 | }; |
| 33 | |
| 34 | static inline struct bfs_sb_info *BFS_SB(struct super_block *sb) |
| 35 | { |
| 36 | return sb->s_fs_info; |
| 37 | } |
| 38 | |
| 39 | static inline struct bfs_inode_info *BFS_I(struct inode *inode) |
| 40 | { |
Dmitri Vorobiev | f433dc5 | 2007-11-14 16:59:47 -0800 | [diff] [blame] | 41 | return container_of(inode, struct bfs_inode_info, vfs_inode); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | |
| 45 | #define printf(format, args...) \ |
Harvey Harrison | 8e24eea | 2008-04-30 00:55:09 -0700 | [diff] [blame] | 46 | printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | |
David Howells | e33ab08 | 2008-02-07 00:15:32 -0800 | [diff] [blame] | 48 | /* inode.c */ |
| 49 | extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | |
| 51 | /* file.c */ |
Arjan van de Ven | 754661f | 2007-02-12 00:55:38 -0800 | [diff] [blame] | 52 | extern const struct inode_operations bfs_file_inops; |
Arjan van de Ven | 4b6f5d2 | 2006-03-28 01:56:42 -0800 | [diff] [blame] | 53 | extern const struct file_operations bfs_file_operations; |
Christoph Hellwig | f5e54d6 | 2006-06-28 04:26:44 -0700 | [diff] [blame] | 54 | extern const struct address_space_operations bfs_aops; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
| 56 | /* dir.c */ |
Arjan van de Ven | 754661f | 2007-02-12 00:55:38 -0800 | [diff] [blame] | 57 | extern const struct inode_operations bfs_dir_inops; |
Arjan van de Ven | 4b6f5d2 | 2006-03-28 01:56:42 -0800 | [diff] [blame] | 58 | extern const struct file_operations bfs_dir_operations; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | |
| 60 | #endif /* _FS_BFS_BFS_H */ |