]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - fs/bfs/bfs.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / fs / bfs / bfs.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2/*
3 * fs/bfs/bfs.h
4 * Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
5 */
6#ifndef _FS_BFS_BFS_H
7#define _FS_BFS_BFS_H
8
9#include <linux/bfs_fs.h>
10
11/*
12 * BFS file system in-core superblock info
13 */
14struct bfs_sb_info {
15 unsigned long si_blocks;
16 unsigned long si_freeb;
17 unsigned long si_freei;
1da177e4
LT
18 unsigned long si_lf_eblk;
19 unsigned long si_lasti;
75b25b4c 20 unsigned long *si_imap;
3f165e4c 21 struct mutex bfs_lock;
1da177e4
LT
22};
23
24/*
25 * BFS file system in-core inode info
26 */
27struct 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
34static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
35{
36 return sb->s_fs_info;
37}
38
39static inline struct bfs_inode_info *BFS_I(struct inode *inode)
40{
f433dc56 41 return container_of(inode, struct bfs_inode_info, vfs_inode);
1da177e4
LT
42}
43
44
45#define printf(format, args...) \
8e24eea7 46 printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args)
1da177e4 47
e33ab086
DH
48/* inode.c */
49extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
1da85fdf 50extern void bfs_dump_imap(const char *, struct super_block *);
1da177e4
LT
51
52/* file.c */
754661f1 53extern const struct inode_operations bfs_file_inops;
4b6f5d20 54extern const struct file_operations bfs_file_operations;
f5e54d6e 55extern const struct address_space_operations bfs_aops;
1da177e4
LT
56
57/* dir.c */
754661f1 58extern const struct inode_operations bfs_dir_inops;
4b6f5d20 59extern const struct file_operations bfs_dir_operations;
1da177e4
LT
60
61#endif /* _FS_BFS_BFS_H */