Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
bfs_fs.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  bfs_inode
 
struct  bfs_dirent
 
struct  bfs_super_block
 

Macros

#define BFS_BSIZE_BITS   9
 
#define BFS_BSIZE   (1<<BFS_BSIZE_BITS)
 
#define BFS_MAGIC   0x1BADFACE
 
#define BFS_ROOT_INO   2
 
#define BFS_INODES_PER_BLOCK   8
 
#define BFS_VDIR   2L
 
#define BFS_VREG   1L
 
#define BFS_NAMELEN   14
 
#define BFS_DIRENT_SIZE   16
 
#define BFS_DIRS_PER_BLOCK   32
 
#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_NZFILESIZE(ip)   ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((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 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock))
 
#define BFS_UNCLEAN(bfs_sb, sb)   ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY))
 

Macro Definition Documentation

#define BFS_BSIZE   (1<<BFS_BSIZE_BITS)

Definition at line 12 of file bfs_fs.h.

#define BFS_BSIZE_BITS   9

Definition at line 11 of file bfs_fs.h.

#define BFS_DIRENT_SIZE   16

Definition at line 41 of file bfs_fs.h.

#define BFS_DIRS_PER_BLOCK   32

Definition at line 42 of file bfs_fs.h.

#define BFS_FILEBLOCKS (   ip)    ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock))

Definition at line 75 of file bfs_fs.h.

#define BFS_FILESIZE (   ip)    ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip))

Definition at line 72 of file bfs_fs.h.

#define BFS_INO2OFF (   ino)    ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE)

Definition at line 67 of file bfs_fs.h.

#define BFS_INODES_PER_BLOCK   8

Definition at line 16 of file bfs_fs.h.

#define BFS_MAGIC   0x1BADFACE

Definition at line 14 of file bfs_fs.h.

#define BFS_NAMELEN   14

Definition at line 40 of file bfs_fs.h.

#define BFS_NZFILESIZE (   ip)    ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE)

Definition at line 69 of file bfs_fs.h.

#define BFS_OFF2INO (   offset)    ((((offset) - BFS_BSIZE) / sizeof(struct bfs_inode)) + BFS_ROOT_INO)

Definition at line 64 of file bfs_fs.h.

#define BFS_ROOT_INO   2

Definition at line 15 of file bfs_fs.h.

#define BFS_UNCLEAN (   bfs_sb,
  sb 
)    ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY))

Definition at line 77 of file bfs_fs.h.

#define BFS_VDIR   2L

Definition at line 19 of file bfs_fs.h.

#define BFS_VREG   1L

Definition at line 20 of file bfs_fs.h.