Go to the documentation of this file.
6 #ifndef _LINUX_BFS_FS_H
7 #define _LINUX_BFS_FS_H
9 #include <linux/types.h>
11 #define BFS_BSIZE_BITS 9
12 #define BFS_BSIZE (1<<BFS_BSIZE_BITS)
14 #define BFS_MAGIC 0x1BADFACE
15 #define BFS_ROOT_INO 2
16 #define BFS_INODES_PER_BLOCK 8
40 #define BFS_NAMELEN 14
41 #define BFS_DIRENT_SIZE 16
42 #define BFS_DIRS_PER_BLOCK 32
64 #define BFS_OFF2INO(offset) \
65 ((((offset) - BFS_BSIZE) / sizeof(struct bfs_inode)) + BFS_ROOT_INO)
67 #define BFS_INO2OFF(ino) \
68 ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE)
69 #define BFS_NZFILESIZE(ip) \
70 ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE)
72 #define BFS_FILESIZE(ip) \
73 ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip))
75 #define BFS_FILEBLOCKS(ip) \
76 ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock))
77 #define BFS_UNCLEAN(bfs_sb, sb) \
78 ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY))