bfs.h 1.3 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 *	fs/bfs/bfs.h
 *	Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
 */
#ifndef _FS_BFS_BFS_H
#define _FS_BFS_BFS_H

#include <linux/bfs_fs.h>

/*
 * BFS file system in-core superblock info
 */
struct bfs_sb_info {
	unsigned long si_blocks;
	unsigned long si_freeb;
	unsigned long si_freei;
	unsigned long si_lf_eblk;
	unsigned long si_lasti;
D
Dmitri Vorobiev 已提交
19
	unsigned long *si_imap;
D
Dmitri Vorobiev 已提交
20
	struct mutex bfs_lock;
L
Linus Torvalds 已提交
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
};

/*
 * BFS file system in-core inode info
 */
struct bfs_inode_info {
	unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
	unsigned long i_sblock;
	unsigned long i_eblock;
	struct inode vfs_inode;
};

static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
{
	return sb->s_fs_info;
}

static inline struct bfs_inode_info *BFS_I(struct inode *inode)
{
40
	return container_of(inode, struct bfs_inode_info, vfs_inode);
L
Linus Torvalds 已提交
41 42 43 44
}


#define printf(format, args...) \
45
	printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args)
L
Linus Torvalds 已提交
46

47 48
/* inode.c */
extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
L
Linus Torvalds 已提交
49 50

/* file.c */
51
extern const struct inode_operations bfs_file_inops;
52
extern const struct file_operations bfs_file_operations;
53
extern const struct address_space_operations bfs_aops;
L
Linus Torvalds 已提交
54 55

/* dir.c */
56
extern const struct inode_operations bfs_dir_inops;
57
extern const struct file_operations bfs_dir_operations;
L
Linus Torvalds 已提交
58 59

#endif /* _FS_BFS_BFS_H */