blob: f40006db36dfdd68c573785cfee4003bf81457a0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 */
13struct bfs_sb_info {
14 unsigned long si_blocks;
15 unsigned long si_freeb;
16 unsigned long si_freei;
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 unsigned long si_lf_eblk;
18 unsigned long si_lasti;
Dmitri Vorobiev75b25b42008-07-25 19:44:52 -070019 unsigned long *si_imap;
Dmitri Vorobiev3f165e42008-07-25 19:44:54 -070020 struct mutex bfs_lock;
Linus Torvalds1da177e2005-04-16 15:20:36 -070021};
22
23/*
24 * BFS file system in-core inode info
25 */
26struct 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
33static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
34{
35 return sb->s_fs_info;
36}
37
38static inline struct bfs_inode_info *BFS_I(struct inode *inode)
39{
Dmitri Vorobievf433dc52007-11-14 16:59:47 -080040 return container_of(inode, struct bfs_inode_info, vfs_inode);
Linus Torvalds1da177e2005-04-16 15:20:36 -070041}
42
43
44#define printf(format, args...) \
Harvey Harrison8e24eea2008-04-30 00:55:09 -070045 printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args)
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
David Howellse33ab082008-02-07 00:15:32 -080047/* inode.c */
48extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
Fabian Frederick1da85fd2014-08-08 14:22:29 -070049extern void bfs_dump_imap(const char *, struct super_block *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
51/* file.c */
Arjan van de Ven754661f2007-02-12 00:55:38 -080052extern const struct inode_operations bfs_file_inops;
Arjan van de Ven4b6f5d22006-03-28 01:56:42 -080053extern const struct file_operations bfs_file_operations;
Christoph Hellwigf5e54d62006-06-28 04:26:44 -070054extern const struct address_space_operations bfs_aops;
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
56/* dir.c */
Arjan van de Ven754661f2007-02-12 00:55:38 -080057extern const struct inode_operations bfs_dir_inops;
Arjan van de Ven4b6f5d22006-03-28 01:56:42 -080058extern const struct file_operations bfs_dir_operations;
Linus Torvalds1da177e2005-04-16 15:20:36 -070059
60#endif /* _FS_BFS_BFS_H */