| * include/linux/bfs_fs.h - BFS data structures on disk. |
| * Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com> |
| #define BFS_BSIZE (1<<BFS_BSIZE_BITS) |
| #define BFS_MAGIC 0x1BADFACE |
| #define BFS_INODES_PER_BLOCK 8 |
| /* SVR4 vnode type values (bfs_inode->i_vtype) */ |
| /* BFS inode layout on disk */ |
| #define BFS_DIRENT_SIZE 16 |
| #define BFS_DIRS_PER_BLOCK 32 |
| /* BFS superblock layout on disk */ |
| #define BFS_NZFILESIZE(ip) \ |
| (((ip)->i_eoffset + 1) - (ip)->i_sblock * BFS_BSIZE) |
| #define BFS_FILESIZE(ip) \ |
| ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) |
| #define BFS_FILEBLOCKS(ip) \ |
| ((ip)->i_sblock == 0 ? 0 : ((ip)->i_eblock + 1) - (ip)->i_sblock) |
| #define BFS_OFF2INO(offset) \ |
| ((((offset) - BFS_BSIZE) / sizeof(struct bfs_inode)) + BFS_ROOT_INO) |
| #define BFS_INO2OFF(ino) \ |
| ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) |
| #define BFS_UNCLEAN(bfs_sb, sb) \ |
| ((bfs_sb->s_from != -1) && (bfs_sb->s_to != -1) && !(sb->s_flags & MS_RDONLY)) |
| #endif /* _LINUX_BFS_FS_H */ |