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

Go to the source code of this file.

Data Structures

struct  ubifs_ch
 
union  ubifs_dev_desc
 
struct  ubifs_ino_node
 
struct  ubifs_dent_node
 
struct  ubifs_data_node
 
struct  ubifs_trun_node
 
struct  ubifs_pad_node
 
struct  ubifs_sb_node
 
struct  ubifs_mst_node
 
struct  ubifs_ref_node
 
struct  ubifs_branch
 
struct  ubifs_idx_node
 
struct  ubifs_cs_node
 
struct  ubifs_orph_node
 

Macros

#define UBIFS_NODE_MAGIC   0x06101831
 
#define UBIFS_FORMAT_VERSION   4
 
#define UBIFS_RO_COMPAT_VERSION   0
 
#define UBIFS_MIN_LEB_SZ   (15*1024)
 
#define UBIFS_CRC32_INIT   0xFFFFFFFFU
 
#define UBIFS_MIN_COMPR_LEN   128
 
#define UBIFS_MIN_COMPRESS_DIFF   64
 
#define UBIFS_ROOT_INO   1
 
#define UBIFS_FIRST_INO   64
 
#define UBIFS_MAX_NLEN   255
 
#define UBIFS_MAX_JHEADS   1
 
#define UBIFS_BLOCK_SIZE   4096
 
#define UBIFS_BLOCK_SHIFT   12
 
#define UBIFS_PADDING_BYTE   0xCE
 
#define UBIFS_MAX_KEY_LEN   16
 
#define UBIFS_SK_LEN   8
 
#define UBIFS_MIN_FANOUT   3
 
#define UBIFS_MAX_LEVELS   512
 
#define UBIFS_MAX_INO_DATA   UBIFS_BLOCK_SIZE
 
#define UBIFS_LPT_FANOUT   4
 
#define UBIFS_LPT_FANOUT_SHIFT   2
 
#define UBIFS_LPT_CRC_BITS   16
 
#define UBIFS_LPT_CRC_BYTES   2
 
#define UBIFS_LPT_TYPE_BITS   4
 
#define UBIFS_KEY_OFFSET   offsetof(struct ubifs_ino_node, key)
 
#define UBIFS_GC_HEAD   0
 
#define UBIFS_BASE_HEAD   1
 
#define UBIFS_DATA_HEAD   2
 
#define UBIFS_S_KEY_BLOCK_BITS   29
 
#define UBIFS_S_KEY_BLOCK_MASK   0x1FFFFFFF
 
#define UBIFS_S_KEY_HASH_BITS   UBIFS_S_KEY_BLOCK_BITS
 
#define UBIFS_S_KEY_HASH_MASK   UBIFS_S_KEY_BLOCK_MASK
 
#define UBIFS_SB_LEBS   1
 
#define UBIFS_MST_LEBS   2
 
#define UBIFS_SB_LNUM   0
 
#define UBIFS_MST_LNUM   (UBIFS_SB_LNUM + UBIFS_SB_LEBS)
 
#define UBIFS_LOG_LNUM   (UBIFS_MST_LNUM + UBIFS_MST_LEBS)
 
#define UBIFS_MIN_LOG_LEBS   2
 
#define UBIFS_MIN_BUD_LEBS   3
 
#define UBIFS_MIN_JNL_LEBS   (UBIFS_MIN_LOG_LEBS + UBIFS_MIN_BUD_LEBS)
 
#define UBIFS_MIN_LPT_LEBS   2
 
#define UBIFS_MIN_ORPH_LEBS   1
 
#define UBIFS_MIN_MAIN_LEBS   (UBIFS_MIN_BUD_LEBS + 6)
 
#define UBIFS_MIN_LEB_CNT
 
#define UBIFS_CH_SZ   sizeof(struct ubifs_ch)
 
#define UBIFS_INO_NODE_SZ   sizeof(struct ubifs_ino_node)
 
#define UBIFS_DATA_NODE_SZ   sizeof(struct ubifs_data_node)
 
#define UBIFS_DENT_NODE_SZ   sizeof(struct ubifs_dent_node)
 
#define UBIFS_TRUN_NODE_SZ   sizeof(struct ubifs_trun_node)
 
#define UBIFS_PAD_NODE_SZ   sizeof(struct ubifs_pad_node)
 
#define UBIFS_SB_NODE_SZ   sizeof(struct ubifs_sb_node)
 
#define UBIFS_MST_NODE_SZ   sizeof(struct ubifs_mst_node)
 
#define UBIFS_REF_NODE_SZ   sizeof(struct ubifs_ref_node)
 
#define UBIFS_IDX_NODE_SZ   sizeof(struct ubifs_idx_node)
 
#define UBIFS_CS_NODE_SZ   sizeof(struct ubifs_cs_node)
 
#define UBIFS_ORPH_NODE_SZ   sizeof(struct ubifs_orph_node)
 
#define UBIFS_XENT_NODE_SZ   UBIFS_DENT_NODE_SZ
 
#define UBIFS_BRANCH_SZ   sizeof(struct ubifs_branch)
 
#define UBIFS_MAX_DATA_NODE_SZ   (UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE)
 
#define UBIFS_MAX_INO_NODE_SZ   (UBIFS_INO_NODE_SZ + UBIFS_MAX_INO_DATA)
 
#define UBIFS_MAX_DENT_NODE_SZ   (UBIFS_DENT_NODE_SZ + UBIFS_MAX_NLEN + 1)
 
#define UBIFS_MAX_XENT_NODE_SZ   UBIFS_MAX_DENT_NODE_SZ
 
#define UBIFS_MAX_NODE_SZ   UBIFS_MAX_INO_NODE_SZ
 
#define UBIFS_FL_MASK   0x0000001F
 

Enumerations

enum  {
  UBIFS_LPT_PNODE, UBIFS_LPT_NNODE, UBIFS_LPT_LTAB, UBIFS_LPT_LSAVE,
  UBIFS_LPT_NODE_CNT, UBIFS_LPT_NOT_A_NODE = (1 << UBIFS_LPT_TYPE_BITS) - 1
}
 
enum  {
  UBIFS_ITYPE_REG, UBIFS_ITYPE_DIR, UBIFS_ITYPE_LNK, UBIFS_ITYPE_BLK,
  UBIFS_ITYPE_CHR, UBIFS_ITYPE_FIFO, UBIFS_ITYPE_SOCK, UBIFS_ITYPES_CNT
}
 
enum  { UBIFS_KEY_HASH_R5, UBIFS_KEY_HASH_TEST }
 
enum  { UBIFS_SIMPLE_KEY_FMT }
 
enum  {
  UBIFS_INO_KEY, UBIFS_DATA_KEY, UBIFS_DENT_KEY, UBIFS_XENT_KEY,
  UBIFS_KEY_TYPES_CNT
}
 
enum  {
  UBIFS_COMPR_FL = 0x01, UBIFS_SYNC_FL = 0x02, UBIFS_IMMUTABLE_FL = 0x04, UBIFS_APPEND_FL = 0x08,
  UBIFS_DIRSYNC_FL = 0x10, UBIFS_XATTR_FL = 0x20
}
 
enum  { UBIFS_COMPR_NONE, UBIFS_COMPR_LZO, UBIFS_COMPR_ZLIB, UBIFS_COMPR_TYPES_CNT }
 
enum  {
  UBIFS_INO_NODE, UBIFS_DATA_NODE, UBIFS_DENT_NODE, UBIFS_XENT_NODE,
  UBIFS_TRUN_NODE, UBIFS_PAD_NODE, UBIFS_SB_NODE, UBIFS_MST_NODE,
  UBIFS_REF_NODE, UBIFS_IDX_NODE, UBIFS_CS_NODE, UBIFS_ORPH_NODE,
  UBIFS_NODE_TYPES_CNT
}
 
enum  { UBIFS_MST_DIRTY = 1, UBIFS_MST_NO_ORPHS = 2, UBIFS_MST_RCVRY = 4 }
 
enum  { UBIFS_NO_NODE_GROUP = 0, UBIFS_IN_NODE_GROUP, UBIFS_LAST_OF_NODE_GROUP }
 
enum  { UBIFS_FLG_BIGLPT = 0x02, UBIFS_FLG_SPACE_FIXUP = 0x04 }
 

Variables

: zero-terminated name

struct ubifs_dent_node - directory entry node. : common header : node key : target inode number : reserved for future, zeroes : type of the target inode (UBIFS_ITYPE_REG, UBIFS_ITYPE_DIR, etc) : name length : reserved for future, zeroes

Note, do not forget to amend 'zero_dent_node_unused()' function when changing the padding fields.

struct ubifs_ch __packed
 

Macro Definition Documentation

#define UBIFS_BASE_HEAD   1

Definition at line 141 of file ubifs-media.h.

#define UBIFS_BLOCK_SHIFT   12

Definition at line 106 of file ubifs-media.h.

#define UBIFS_BLOCK_SIZE   4096

Definition at line 105 of file ubifs-media.h.

#define UBIFS_BRANCH_SZ   sizeof(struct ubifs_branch)

Definition at line 292 of file ubifs-media.h.

#define UBIFS_CH_SZ   sizeof(struct ubifs_ch)

Definition at line 277 of file ubifs-media.h.

#define UBIFS_CRC32_INIT   0xFFFFFFFFU

Definition at line 68 of file ubifs-media.h.

#define UBIFS_CS_NODE_SZ   sizeof(struct ubifs_cs_node)

Definition at line 287 of file ubifs-media.h.

#define UBIFS_DATA_HEAD   2

Definition at line 143 of file ubifs-media.h.

#define UBIFS_DATA_NODE_SZ   sizeof(struct ubifs_data_node)

Definition at line 279 of file ubifs-media.h.

#define UBIFS_DENT_NODE_SZ   sizeof(struct ubifs_dent_node)

Definition at line 280 of file ubifs-media.h.

#define UBIFS_FIRST_INO   64

Definition at line 87 of file ubifs-media.h.

#define UBIFS_FL_MASK   0x0000001F

Definition at line 327 of file ubifs-media.h.

#define UBIFS_FORMAT_VERSION   4

Definition at line 49 of file ubifs-media.h.

#define UBIFS_GC_HEAD   0

Definition at line 139 of file ubifs-media.h.

#define UBIFS_IDX_NODE_SZ   sizeof(struct ubifs_idx_node)

Definition at line 286 of file ubifs-media.h.

#define UBIFS_INO_NODE_SZ   sizeof(struct ubifs_ino_node)

Definition at line 278 of file ubifs-media.h.

#define UBIFS_KEY_OFFSET   offsetof(struct ubifs_ino_node, key)

Definition at line 136 of file ubifs-media.h.

#define UBIFS_LOG_LNUM   (UBIFS_MST_LNUM + UBIFS_MST_LEBS)

Definition at line 243 of file ubifs-media.h.

#define UBIFS_LPT_CRC_BITS   16

Definition at line 131 of file ubifs-media.h.

#define UBIFS_LPT_CRC_BYTES   2

Definition at line 132 of file ubifs-media.h.

#define UBIFS_LPT_FANOUT   4

Definition at line 127 of file ubifs-media.h.

#define UBIFS_LPT_FANOUT_SHIFT   2

Definition at line 128 of file ubifs-media.h.

#define UBIFS_LPT_TYPE_BITS   4

Definition at line 133 of file ubifs-media.h.

#define UBIFS_MAX_DATA_NODE_SZ   (UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE)

Definition at line 295 of file ubifs-media.h.

#define UBIFS_MAX_DENT_NODE_SZ   (UBIFS_DENT_NODE_SZ + UBIFS_MAX_NLEN + 1)

Definition at line 297 of file ubifs-media.h.

#define UBIFS_MAX_INO_DATA   UBIFS_BLOCK_SIZE

Definition at line 124 of file ubifs-media.h.

#define UBIFS_MAX_INO_NODE_SZ   (UBIFS_INO_NODE_SZ + UBIFS_MAX_INO_DATA)

Definition at line 296 of file ubifs-media.h.

#define UBIFS_MAX_JHEADS   1

Definition at line 96 of file ubifs-media.h.

#define UBIFS_MAX_KEY_LEN   16

Definition at line 112 of file ubifs-media.h.

#define UBIFS_MAX_LEVELS   512

Definition at line 121 of file ubifs-media.h.

#define UBIFS_MAX_NLEN   255

Definition at line 93 of file ubifs-media.h.

#define UBIFS_MAX_NODE_SZ   UBIFS_MAX_INO_NODE_SZ

Definition at line 301 of file ubifs-media.h.

#define UBIFS_MAX_XENT_NODE_SZ   UBIFS_MAX_DENT_NODE_SZ

Definition at line 298 of file ubifs-media.h.

#define UBIFS_MIN_BUD_LEBS   3

Definition at line 258 of file ubifs-media.h.

#define UBIFS_MIN_COMPR_LEN   128

Definition at line 74 of file ubifs-media.h.

#define UBIFS_MIN_COMPRESS_DIFF   64

Definition at line 81 of file ubifs-media.h.

#define UBIFS_MIN_FANOUT   3

Definition at line 118 of file ubifs-media.h.

#define UBIFS_MIN_JNL_LEBS   (UBIFS_MIN_LOG_LEBS + UBIFS_MIN_BUD_LEBS)

Definition at line 260 of file ubifs-media.h.

#define UBIFS_MIN_LEB_CNT
Value:
UBIFS_MIN_LOG_LEBS + UBIFS_MIN_LPT_LEBS + \
UBIFS_MIN_ORPH_LEBS + UBIFS_MIN_MAIN_LEBS)

Definition at line 272 of file ubifs-media.h.

#define UBIFS_MIN_LEB_SZ   (15*1024)

Definition at line 65 of file ubifs-media.h.

#define UBIFS_MIN_LOG_LEBS   2

Definition at line 256 of file ubifs-media.h.

#define UBIFS_MIN_LPT_LEBS   2

Definition at line 262 of file ubifs-media.h.

#define UBIFS_MIN_MAIN_LEBS   (UBIFS_MIN_BUD_LEBS + 6)

Definition at line 269 of file ubifs-media.h.

#define UBIFS_MIN_ORPH_LEBS   1

Definition at line 264 of file ubifs-media.h.

#define UBIFS_MST_LEBS   2

Definition at line 236 of file ubifs-media.h.

#define UBIFS_MST_LNUM   (UBIFS_SB_LNUM + UBIFS_SB_LEBS)

Definition at line 241 of file ubifs-media.h.

#define UBIFS_MST_NODE_SZ   sizeof(struct ubifs_mst_node)

Definition at line 284 of file ubifs-media.h.

#define UBIFS_NODE_MAGIC   0x06101831

Definition at line 37 of file ubifs-media.h.

#define UBIFS_ORPH_NODE_SZ   sizeof(struct ubifs_orph_node)

Definition at line 288 of file ubifs-media.h.

#define UBIFS_PAD_NODE_SZ   sizeof(struct ubifs_pad_node)

Definition at line 282 of file ubifs-media.h.

#define UBIFS_PADDING_BYTE   0xCE

Definition at line 109 of file ubifs-media.h.

#define UBIFS_REF_NODE_SZ   sizeof(struct ubifs_ref_node)

Definition at line 285 of file ubifs-media.h.

#define UBIFS_RO_COMPAT_VERSION   0

Definition at line 62 of file ubifs-media.h.

#define UBIFS_ROOT_INO   1

Definition at line 84 of file ubifs-media.h.

#define UBIFS_S_KEY_BLOCK_BITS   29

Definition at line 211 of file ubifs-media.h.

#define UBIFS_S_KEY_BLOCK_MASK   0x1FFFFFFF

Definition at line 212 of file ubifs-media.h.

#define UBIFS_S_KEY_HASH_BITS   UBIFS_S_KEY_BLOCK_BITS

Definition at line 213 of file ubifs-media.h.

#define UBIFS_S_KEY_HASH_MASK   UBIFS_S_KEY_BLOCK_MASK

Definition at line 214 of file ubifs-media.h.

#define UBIFS_SB_LEBS   1

Definition at line 234 of file ubifs-media.h.

#define UBIFS_SB_LNUM   0

Definition at line 239 of file ubifs-media.h.

#define UBIFS_SB_NODE_SZ   sizeof(struct ubifs_sb_node)

Definition at line 283 of file ubifs-media.h.

#define UBIFS_SK_LEN   8

Definition at line 115 of file ubifs-media.h.

#define UBIFS_TRUN_NODE_SZ   sizeof(struct ubifs_trun_node)

Definition at line 281 of file ubifs-media.h.

#define UBIFS_XENT_NODE_SZ   UBIFS_DENT_NODE_SZ

Definition at line 290 of file ubifs-media.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
UBIFS_LPT_PNODE 
UBIFS_LPT_NNODE 
UBIFS_LPT_LTAB 
UBIFS_LPT_LSAVE 
UBIFS_LPT_NODE_CNT 
UBIFS_LPT_NOT_A_NODE 

Definition at line 155 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_ITYPE_REG 
UBIFS_ITYPE_DIR 
UBIFS_ITYPE_LNK 
UBIFS_ITYPE_BLK 
UBIFS_ITYPE_CHR 
UBIFS_ITYPE_FIFO 
UBIFS_ITYPE_SOCK 
UBIFS_ITYPES_CNT 

Definition at line 176 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_KEY_HASH_R5 
UBIFS_KEY_HASH_TEST 

Definition at line 193 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_SIMPLE_KEY_FMT 

Definition at line 203 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_INO_KEY 
UBIFS_DATA_KEY 
UBIFS_DENT_KEY 
UBIFS_XENT_KEY 
UBIFS_KEY_TYPES_CNT 

Definition at line 225 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_COMPR_FL 
UBIFS_SYNC_FL 
UBIFS_IMMUTABLE_FL 
UBIFS_APPEND_FL 
UBIFS_DIRSYNC_FL 
UBIFS_XATTR_FL 

Definition at line 317 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_COMPR_NONE 
UBIFS_COMPR_LZO 
UBIFS_COMPR_ZLIB 
UBIFS_COMPR_TYPES_CNT 

Definition at line 337 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_INO_NODE 
UBIFS_DATA_NODE 
UBIFS_DENT_NODE 
UBIFS_XENT_NODE 
UBIFS_TRUN_NODE 
UBIFS_PAD_NODE 
UBIFS_SB_NODE 
UBIFS_MST_NODE 
UBIFS_REF_NODE 
UBIFS_IDX_NODE 
UBIFS_CS_NODE 
UBIFS_ORPH_NODE 
UBIFS_NODE_TYPES_CNT 

Definition at line 365 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_MST_DIRTY 
UBIFS_MST_NO_ORPHS 
UBIFS_MST_RCVRY 

Definition at line 388 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_NO_NODE_GROUP 
UBIFS_IN_NODE_GROUP 
UBIFS_LAST_OF_NODE_GROUP 

Definition at line 401 of file ubifs-media.h.

anonymous enum
Enumerator:
UBIFS_FLG_BIGLPT 
UBIFS_FLG_SPACE_FIXUP 

Definition at line 413 of file ubifs-media.h.

Variable Documentation