Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
logfs_abi.h File Reference

Go to the source code of this file.

Data Structures

struct  logfs_segment_header
 
struct  logfs_disk_super
 
struct  logfs_object_header
 
struct  logfs_disk_inode
 
struct  logfs_disk_dentry
 
struct  logfs_segment_entry
 
struct  logfs_journal_header
 
struct  logfs_je_area
 
struct  logfs_je_dynsb
 
struct  logfs_je_anchor
 
struct  logfs_je_spillout
 
struct  logfs_je_journal_ec
 
struct  logfs_je_free_segments
 
struct  logfs_seg_alias
 
struct  logfs_obj_alias
 

Macros

#define BUILD_BUG_ON(condition)
 
#define SIZE_CHECK(type, size)
 
#define LOGFS_MAGIC   0x7a3a8e5cb9d5bf67ull
 
#define LOGFS_MAGIC_U32   0xc97e8168u
 
#define LOGFS_BLOCKSIZE   (4096ull)
 
#define LOGFS_BLOCK_FACTOR   (LOGFS_BLOCKSIZE / sizeof(u64))
 
#define LOGFS_BLOCK_BITS   (9)
 
#define I0_BLOCKS   (16)
 
#define I1_BLOCKS   LOGFS_BLOCK_FACTOR
 
#define I2_BLOCKS   (LOGFS_BLOCK_FACTOR * I1_BLOCKS)
 
#define I3_BLOCKS   (LOGFS_BLOCK_FACTOR * I2_BLOCKS)
 
#define I4_BLOCKS   (LOGFS_BLOCK_FACTOR * I3_BLOCKS)
 
#define I5_BLOCKS   (LOGFS_BLOCK_FACTOR * I4_BLOCKS)
 
#define INDIRECT_INDEX   I0_BLOCKS
 
#define LOGFS_EMBEDDED_FIELDS   (I0_BLOCKS + 1)
 
#define LOGFS_EMBEDDED_SIZE   (LOGFS_EMBEDDED_FIELDS * sizeof(u64))
 
#define LOGFS_I0_SIZE   (I0_BLOCKS * LOGFS_BLOCKSIZE)
 
#define LOGFS_I1_SIZE   (I1_BLOCKS * LOGFS_BLOCKSIZE)
 
#define LOGFS_I2_SIZE   (I2_BLOCKS * LOGFS_BLOCKSIZE)
 
#define LOGFS_I3_SIZE   (I3_BLOCKS * LOGFS_BLOCKSIZE)
 
#define LOGFS_I4_SIZE   (I4_BLOCKS * LOGFS_BLOCKSIZE)
 
#define LOGFS_I5_SIZE   (I5_BLOCKS * LOGFS_BLOCKSIZE)
 
#define LOGFS_FULLY_POPULATED   (1ULL << 63)
 
#define pure_ofs(ofs)   (ofs & ~LOGFS_FULLY_POPULATED)
 
#define LOGFS_MAX_INDIRECT   (5)
 
#define LOGFS_MAX_LEVELS   (LOGFS_MAX_INDIRECT + 1)
 
#define LOGFS_NO_AREAS   (2 * LOGFS_MAX_LEVELS)
 
#define LOGFS_MAX_NAMELEN   (255)
 
#define LOGFS_JOURNAL_SEGS   (16)
 
#define MAX_CACHED_SEGS   (64)
 
#define LOGFS_OBJECT_HEADERSIZE   (0x1c)
 
#define LOGFS_SEGMENT_HEADERSIZE   (0x18)
 
#define LOGFS_MAX_OBJECTSIZE   (LOGFS_OBJECT_HEADERSIZE + LOGFS_BLOCKSIZE)
 
#define LOGFS_SEGMENT_RESERVE   (LOGFS_SEGMENT_HEADERSIZE + LOGFS_MAX_OBJECTSIZE - 1)
 
#define LOGFS_FEATURES_INCOMPAT   (0ull)
 
#define LOGFS_FEATURES_RO_COMPAT   (0ull)
 
#define LOGFS_FEATURES_COMPAT   (0ull)
 
#define LOGFS_IF_COMPRESSED   0x00000004 /* == FS_COMPR_FL */
 
#define LOGFS_IF_DIRTY   0x20000000
 
#define LOGFS_IF_ZOMBIE   0x40000000
 
#define LOGFS_IF_STILLBORN   0x80000000
 
#define LOGFS_FL_USER_VISIBLE   (LOGFS_IF_COMPRESSED)
 
#define LOGFS_FL_USER_MODIFIABLE   (LOGFS_IF_COMPRESSED)
 
#define LOGFS_FL_INHERITED   (LOGFS_IF_COMPRESSED)
 
#define INODE_POINTER_OFS   (offsetof(struct logfs_disk_inode, di_data) / sizeof(__be64))
 
#define INODE_USED_OFS   (offsetof(struct logfs_disk_inode, di_used_bytes) / sizeof(__be64))
 
#define INODE_SIZE_OFS   (offsetof(struct logfs_disk_inode, di_size) / sizeof(__be64))
 
#define INODE_HEIGHT_OFS   (0)
 

Enumerations

enum  { SEG_SUPER = 0x01, SEG_JOURNAL = 0x02, SEG_OSTORE = 0x03 }
 
enum  { OBJ_BLOCK = 0x04, OBJ_INODE = 0x05, OBJ_DENTRY = 0x06 }
 
enum  {
  LOGFS_INO_MAPPING = 0x00, LOGFS_INO_MASTER = 0x01, LOGFS_INO_ROOT = 0x02, LOGFS_INO_SEGFILE = 0x03,
  LOGFS_RESERVED_INOS = 0x10
}
 

Functions

 SIZE_CHECK (logfs_segment_header, LOGFS_SEGMENT_HEADERSIZE)
 
 SIZE_CHECK (logfs_disk_super, 256)
 
struct logfs_object_header __attribute__ ((packed))
 
 SIZE_CHECK (logfs_object_header, LOGFS_OBJECT_HEADERSIZE)
 
 SIZE_CHECK (logfs_disk_inode, 200)
 

Variables

__be32 crc
 
__be16 len
 
__u8 type
 
__u8 compr
 
__be64 ino
 
__be64 bix
 
__be32 data_crc
 
__be16 namelen
 
__u8 name [LOGFS_MAX_NAMELEN]
 
__be32 segno
 
__be32 used_bytes
 
__u8 gc_level
 
__u8 vim
 

: file name

struct logfs_disk_dentry - on-medium dentry structure

: inode number : length of file name : file type, identical to bits 12..15 of mode

#define RESERVED   0xffffffff
 
#define BADSEG   0xffffffff
 
#define MAX_JOURNAL_HEADER   (sizeof(struct logfs_journal_header) + sizeof(struct logfs_je_area))
 
enum  logfs_vim { VIM_DEFAULT = 0, VIM_SEGFILE = 1 }
 
enum  { COMPR_NONE = 0, COMPR_ZLIB = 1 }
 
enum  {
  JE_FIRST = 0x01, JEG_BASE = 0x00, JE_COMMIT = 0x02, JE_DYNSB = 0x03,
  JE_ANCHOR = 0x04, JE_ERASECOUNT = 0x05, JE_SPILLOUT = 0x06, JE_OBJ_ALIAS = 0x0d,
  JE_AREA = 0x0e, JE_LAST = 0x0e
}
 
enum { ... }  __attribute__
 
 SIZE_CHECK (logfs_disk_dentry, 266)
 
 SIZE_CHECK (logfs_segment_entry, 8)
 
 SIZE_CHECK (logfs_journal_header, 16)
 
 SIZE_CHECK (logfs_je_area, 10)
 
 SIZE_CHECK (logfs_je_dynsb, 64)
 
 SIZE_CHECK (logfs_je_anchor, 168)
 
 SIZE_CHECK (logfs_je_spillout, 0)
 
 SIZE_CHECK (logfs_je_journal_ec, 0)
 
 SIZE_CHECK (logfs_je_free_segments, 8)
 
 SIZE_CHECK (logfs_seg_alias, 8)
 
 SIZE_CHECK (logfs_obj_alias, 32)
 

Macro Definition Documentation

#define BADSEG   0xffffffff

Definition at line 397 of file logfs_abi.h.

#define BUILD_BUG_ON (   condition)

Definition at line 15 of file logfs_abi.h.

#define I0_BLOCKS   (16)

Definition at line 85 of file logfs_abi.h.

#define I1_BLOCKS   LOGFS_BLOCK_FACTOR

Definition at line 86 of file logfs_abi.h.

#define I2_BLOCKS   (LOGFS_BLOCK_FACTOR * I1_BLOCKS)

Definition at line 87 of file logfs_abi.h.

#define I3_BLOCKS   (LOGFS_BLOCK_FACTOR * I2_BLOCKS)

Definition at line 88 of file logfs_abi.h.

#define I4_BLOCKS   (LOGFS_BLOCK_FACTOR * I3_BLOCKS)

Definition at line 89 of file logfs_abi.h.

#define I5_BLOCKS   (LOGFS_BLOCK_FACTOR * I4_BLOCKS)

Definition at line 90 of file logfs_abi.h.

#define INDIRECT_INDEX   I0_BLOCKS

Definition at line 92 of file logfs_abi.h.

#define INODE_HEIGHT_OFS   (0)

Definition at line 376 of file logfs_abi.h.

#define INODE_POINTER_OFS   (offsetof(struct logfs_disk_inode, di_data) / sizeof(__be64))

Definition at line 370 of file logfs_abi.h.

#define INODE_SIZE_OFS   (offsetof(struct logfs_disk_inode, di_size) / sizeof(__be64))

Definition at line 374 of file logfs_abi.h.

#define INODE_USED_OFS   (offsetof(struct logfs_disk_inode, di_used_bytes) / sizeof(__be64))

Definition at line 372 of file logfs_abi.h.

#define LOGFS_BLOCK_BITS   (9)

Definition at line 79 of file logfs_abi.h.

#define LOGFS_BLOCK_FACTOR   (LOGFS_BLOCKSIZE / sizeof(u64))

Definition at line 78 of file logfs_abi.h.

#define LOGFS_BLOCKSIZE   (4096ull)

Definition at line 77 of file logfs_abi.h.

#define LOGFS_EMBEDDED_FIELDS   (I0_BLOCKS + 1)

Definition at line 93 of file logfs_abi.h.

#define LOGFS_EMBEDDED_SIZE   (LOGFS_EMBEDDED_FIELDS * sizeof(u64))

Definition at line 103 of file logfs_abi.h.

#define LOGFS_FEATURES_COMPAT   (0ull)

Definition at line 198 of file logfs_abi.h.

#define LOGFS_FEATURES_INCOMPAT   (0ull)

Definition at line 196 of file logfs_abi.h.

#define LOGFS_FEATURES_RO_COMPAT   (0ull)

Definition at line 197 of file logfs_abi.h.

#define LOGFS_FL_INHERITED   (LOGFS_IF_COMPRESSED)

Definition at line 329 of file logfs_abi.h.

#define LOGFS_FL_USER_MODIFIABLE   (LOGFS_IF_COMPRESSED)

Definition at line 327 of file logfs_abi.h.

#define LOGFS_FL_USER_VISIBLE   (LOGFS_IF_COMPRESSED)

Definition at line 326 of file logfs_abi.h.

#define LOGFS_FULLY_POPULATED   (1ULL << 63)

Definition at line 116 of file logfs_abi.h.

#define LOGFS_I0_SIZE   (I0_BLOCKS * LOGFS_BLOCKSIZE)

Definition at line 104 of file logfs_abi.h.

#define LOGFS_I1_SIZE   (I1_BLOCKS * LOGFS_BLOCKSIZE)

Definition at line 105 of file logfs_abi.h.

#define LOGFS_I2_SIZE   (I2_BLOCKS * LOGFS_BLOCKSIZE)

Definition at line 106 of file logfs_abi.h.

#define LOGFS_I3_SIZE   (I3_BLOCKS * LOGFS_BLOCKSIZE)

Definition at line 107 of file logfs_abi.h.

#define LOGFS_I4_SIZE   (I4_BLOCKS * LOGFS_BLOCKSIZE)

Definition at line 108 of file logfs_abi.h.

#define LOGFS_I5_SIZE   (I5_BLOCKS * LOGFS_BLOCKSIZE)

Definition at line 109 of file logfs_abi.h.

#define LOGFS_IF_COMPRESSED   0x00000004 /* == FS_COMPR_FL */

Definition at line 320 of file logfs_abi.h.

#define LOGFS_IF_DIRTY   0x20000000

Definition at line 321 of file logfs_abi.h.

#define LOGFS_IF_STILLBORN   0x80000000

Definition at line 323 of file logfs_abi.h.

#define LOGFS_IF_ZOMBIE   0x40000000

Definition at line 322 of file logfs_abi.h.

#define LOGFS_JOURNAL_SEGS   (16)

Definition at line 141 of file logfs_abi.h.

#define LOGFS_MAGIC   0x7a3a8e5cb9d5bf67ull

Definition at line 64 of file logfs_abi.h.

#define LOGFS_MAGIC_U32   0xc97e8168u

Definition at line 65 of file logfs_abi.h.

#define LOGFS_MAX_INDIRECT   (5)

Definition at line 133 of file logfs_abi.h.

#define LOGFS_MAX_LEVELS   (LOGFS_MAX_INDIRECT + 1)

Definition at line 134 of file logfs_abi.h.

#define LOGFS_MAX_NAMELEN   (255)

Definition at line 138 of file logfs_abi.h.

#define LOGFS_MAX_OBJECTSIZE   (LOGFS_OBJECT_HEADERSIZE + LOGFS_BLOCKSIZE)

Definition at line 157 of file logfs_abi.h.

#define LOGFS_NO_AREAS   (2 * LOGFS_MAX_LEVELS)

Definition at line 135 of file logfs_abi.h.

#define LOGFS_OBJECT_HEADERSIZE   (0x1c)

Definition at line 155 of file logfs_abi.h.

#define LOGFS_SEGMENT_HEADERSIZE   (0x18)

Definition at line 156 of file logfs_abi.h.

#define LOGFS_SEGMENT_RESERVE   (LOGFS_SEGMENT_HEADERSIZE + LOGFS_MAX_OBJECTSIZE - 1)

Definition at line 158 of file logfs_abi.h.

#define MAX_CACHED_SEGS   (64)

Definition at line 144 of file logfs_abi.h.

#define MAX_JOURNAL_HEADER   (sizeof(struct logfs_journal_header) + sizeof(struct logfs_je_area))

Definition at line 473 of file logfs_abi.h.

#define pure_ofs (   ofs)    (ofs & ~LOGFS_FULLY_POPULATED)

Definition at line 117 of file logfs_abi.h.

#define RESERVED   0xffffffff

Definition at line 396 of file logfs_abi.h.

#define SIZE_CHECK (   type,
  size 
)
Value:
static inline void check_##type(void) \
{ \
BUILD_BUG_ON(sizeof(struct type) != (size)); \
}

Definition at line 18 of file logfs_abi.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
SEG_SUPER 
SEG_JOURNAL 
SEG_OSTORE 

Definition at line 167 of file logfs_abi.h.

anonymous enum
Enumerator:
OBJ_BLOCK 
OBJ_INODE 
OBJ_DENTRY 

Definition at line 267 of file logfs_abi.h.

anonymous enum
Enumerator:
LOGFS_INO_MAPPING 
LOGFS_INO_MASTER 
LOGFS_INO_ROOT 
LOGFS_INO_SEGFILE 
LOGFS_RESERVED_INOS 

Definition at line 302 of file logfs_abi.h.

anonymous enum

Compression types.

COMPR_NONE - uncompressed COMPR_ZLIB - compressed with zlib

Enumerator:
COMPR_NONE 
COMPR_ZLIB 

Definition at line 591 of file logfs_abi.h.

anonymous enum
Enumerator:
JE_FIRST 
JEG_BASE 
JE_COMMIT 
JE_DYNSB 
JE_ANCHOR 
JE_ERASECOUNT 
JE_SPILLOUT 
JE_OBJ_ALIAS 
JE_AREA 
JE_LAST 

Definition at line 614 of file logfs_abi.h.

enum logfs_vim
Enumerator:
VIM_DEFAULT 
VIM_SEGFILE 

Definition at line 445 of file logfs_abi.h.

Function Documentation

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

SIZE_CHECK ( logfs_disk_super  ,
256   
)
SIZE_CHECK ( logfs_disk_inode  ,
200   
)
SIZE_CHECK ( logfs_disk_dentry  ,
266   
)
SIZE_CHECK ( logfs_segment_entry  ,
 
)
SIZE_CHECK ( logfs_journal_header  ,
16   
)
SIZE_CHECK ( logfs_je_area  ,
10   
)
SIZE_CHECK ( logfs_je_dynsb  ,
64   
)
SIZE_CHECK ( logfs_je_anchor  ,
168   
)
SIZE_CHECK ( logfs_je_spillout  ,
 
)
SIZE_CHECK ( logfs_je_journal_ec  ,
 
)
SIZE_CHECK ( logfs_je_free_segments  ,
 
)
SIZE_CHECK ( logfs_seg_alias  ,
 
)
SIZE_CHECK ( logfs_obj_alias  ,
32   
)

Variable Documentation

__be64 bix

Definition at line 298 of file logfs_abi.h.

__u8 compr

Definition at line 296 of file logfs_abi.h.

__be32 crc

Definition at line 293 of file logfs_abi.h.

__be32 data_crc

Definition at line 299 of file logfs_abi.h.

__u8 gc_level

Definition at line 472 of file logfs_abi.h.

__be64 ino

Definition at line 297 of file logfs_abi.h.

__be16 len

Definition at line 294 of file logfs_abi.h.

Definition at line 396 of file logfs_abi.h.

__be16 namelen

Definition at line 394 of file logfs_abi.h.

__be32 segno

Definition at line 470 of file logfs_abi.h.

Definition at line 295 of file logfs_abi.h.

__be32 used_bytes

Definition at line 471 of file logfs_abi.h.

__u8 vim

Definition at line 473 of file logfs_abi.h.