1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * This file is part of UBIFS.
5 * Copyright (C) 2006-2008 Nokia Corporation.
7 * Authors: Artem Bityutskiy (Битюцкий Артём)
12 * This file describes UBIFS on-flash format and contains definitions of all the
13 * relevant data structures and constants.
15 * All UBIFS on-flash objects are stored in the form of nodes. All nodes start
16 * with the UBIFS node magic number and have the same common header. Nodes
17 * always sit at 8-byte aligned positions on the media and node header sizes are
18 * also 8-byte aligned (except for the indexing node and the padding node).
21 #ifndef __UBIFS_MEDIA_H__
22 #define __UBIFS_MEDIA_H__
24 /* UBIFS node magic number (must not have the padding byte first or last) */
25 #define UBIFS_NODE_MAGIC 0x06101831
28 * UBIFS on-flash format version. This version is increased when the on-flash
29 * format is changing. If this happens, UBIFS is will support older versions as
30 * well. But older UBIFS code will not support newer formats. Format changes
31 * will be rare and only when absolutely necessary, e.g. to fix a bug or to add
34 * UBIFS went into mainline kernel with format version 4. The older formats
35 * were development formats.
37 #define UBIFS_FORMAT_VERSION 5
40 * Read-only compatibility version. If the UBIFS format is changed, older UBIFS
41 * implementations will not be able to mount newer formats in read-write mode.
42 * However, depending on the change, it may be possible to mount newer formats
43 * in R/O mode. This is indicated by the R/O compatibility version which is
44 * stored in the super-block.
46 * This is needed to support boot-loaders which only need R/O mounting. With
47 * this flag it is possible to do UBIFS format changes without a need to update
50 #define UBIFS_RO_COMPAT_VERSION 0
52 /* Minimum logical eraseblock size in bytes */
53 #define UBIFS_MIN_LEB_SZ (15*1024)
55 /* Initial CRC32 value used when calculating CRC checksums */
56 #define UBIFS_CRC32_INIT 0xFFFFFFFFU
59 * UBIFS does not try to compress data if its length is less than the below
62 #define UBIFS_MIN_COMPR_LEN 128
65 * If compressed data length is less than %UBIFS_MIN_COMPRESS_DIFF bytes
66 * shorter than uncompressed data length, UBIFS prefers to leave this data
67 * node uncompress, because it'll be read faster.
69 #define UBIFS_MIN_COMPRESS_DIFF 64
71 /* Root inode number */
72 #define UBIFS_ROOT_INO 1
74 /* Lowest inode number used for regular inodes (not UBIFS-only internal ones) */
75 #define UBIFS_FIRST_INO 64
78 * Maximum file name and extended attribute length (must be a multiple of 8,
81 #define UBIFS_MAX_NLEN 255
83 /* Maximum number of data journal heads */
84 #define UBIFS_MAX_JHEADS 1
87 * Size of UBIFS data block. Note, UBIFS is not a block oriented file-system,
88 * which means that it does not treat the underlying media as consisting of
89 * blocks like in case of hard drives. Do not be confused. UBIFS block is just
90 * the maximum amount of data which one data node can have or which can be
91 * attached to an inode node.
93 #define UBIFS_BLOCK_SIZE 4096
94 #define UBIFS_BLOCK_SHIFT 12
96 /* UBIFS padding byte pattern (must not be first or last byte of node magic) */
97 #define UBIFS_PADDING_BYTE 0xCE
99 /* Maximum possible key length */
100 #define UBIFS_MAX_KEY_LEN 16
102 /* Key length ("simple" format) */
103 #define UBIFS_SK_LEN 8
105 /* Minimum index tree fanout */
106 #define UBIFS_MIN_FANOUT 3
108 /* Maximum number of levels in UBIFS indexing B-tree */
109 #define UBIFS_MAX_LEVELS 512
111 /* Maximum amount of data attached to an inode in bytes */
112 #define UBIFS_MAX_INO_DATA UBIFS_BLOCK_SIZE
114 /* LEB Properties Tree fanout (must be power of 2) and fanout shift */
115 #define UBIFS_LPT_FANOUT 4
116 #define UBIFS_LPT_FANOUT_SHIFT 2
118 /* LEB Properties Tree bit field sizes */
119 #define UBIFS_LPT_CRC_BITS 16
120 #define UBIFS_LPT_CRC_BYTES 2
121 #define UBIFS_LPT_TYPE_BITS 4
123 /* The key is always at the same position in all keyed nodes */
124 #define UBIFS_KEY_OFFSET offsetof(struct ubifs_ino_node, key)
126 /* Garbage collector journal head number */
127 #define UBIFS_GC_HEAD 0
128 /* Base journal head number */
129 #define UBIFS_BASE_HEAD 1
130 /* Data journal head number */
131 #define UBIFS_DATA_HEAD 2
134 * LEB Properties Tree node types.
136 * UBIFS_LPT_PNODE: LPT leaf node (contains LEB properties)
137 * UBIFS_LPT_NNODE: LPT internal node
138 * UBIFS_LPT_LTAB: LPT's own lprops table
139 * UBIFS_LPT_LSAVE: LPT's save table (big model only)
140 * UBIFS_LPT_NODE_CNT: count of LPT node types
141 * UBIFS_LPT_NOT_A_NODE: all ones (15 for 4 bits) is never a valid node type
149 UBIFS_LPT_NOT_A_NODE = (1 << UBIFS_LPT_TYPE_BITS) - 1,
155 * UBIFS_ITYPE_REG: regular file
156 * UBIFS_ITYPE_DIR: directory
157 * UBIFS_ITYPE_LNK: soft link
158 * UBIFS_ITYPE_BLK: block device node
159 * UBIFS_ITYPE_CHR: character device node
160 * UBIFS_ITYPE_FIFO: fifo
161 * UBIFS_ITYPE_SOCK: socket
162 * UBIFS_ITYPES_CNT: count of supported file types
176 * Supported key hash functions.
178 * UBIFS_KEY_HASH_R5: R5 hash
179 * UBIFS_KEY_HASH_TEST: test hash which just returns first 4 bytes of the name
187 * Supported key formats.
189 * UBIFS_SIMPLE_KEY_FMT: simple key format
192 UBIFS_SIMPLE_KEY_FMT,
196 * The simple key format uses 29 bits for storing UBIFS block number and hash
199 #define UBIFS_S_KEY_BLOCK_BITS 29
200 #define UBIFS_S_KEY_BLOCK_MASK 0x1FFFFFFF
201 #define UBIFS_S_KEY_HASH_BITS UBIFS_S_KEY_BLOCK_BITS
202 #define UBIFS_S_KEY_HASH_MASK UBIFS_S_KEY_BLOCK_MASK
207 * UBIFS_INO_KEY: inode node key
208 * UBIFS_DATA_KEY: data node key
209 * UBIFS_DENT_KEY: directory entry node key
210 * UBIFS_XENT_KEY: extended attribute entry key
211 * UBIFS_KEY_TYPES_CNT: number of supported key types
221 /* Count of LEBs reserved for the superblock area */
222 #define UBIFS_SB_LEBS 1
223 /* Count of LEBs reserved for the master area */
224 #define UBIFS_MST_LEBS 2
226 /* First LEB of the superblock area */
227 #define UBIFS_SB_LNUM 0
228 /* First LEB of the master area */
229 #define UBIFS_MST_LNUM (UBIFS_SB_LNUM + UBIFS_SB_LEBS)
230 /* First LEB of the log area */
231 #define UBIFS_LOG_LNUM (UBIFS_MST_LNUM + UBIFS_MST_LEBS)
234 * The below constants define the absolute minimum values for various UBIFS
235 * media areas. Many of them actually depend of flash geometry and the FS
236 * configuration (number of journal heads, orphan LEBs, etc). This means that
237 * the smallest volume size which can be used for UBIFS cannot be pre-defined
238 * by these constants. The file-system that meets the below limitation will not
239 * necessarily mount. UBIFS does run-time calculations and validates the FS
243 /* Minimum number of logical eraseblocks in the log */
244 #define UBIFS_MIN_LOG_LEBS 2
245 /* Minimum number of bud logical eraseblocks (one for each head) */
246 #define UBIFS_MIN_BUD_LEBS 3
247 /* Minimum number of journal logical eraseblocks */
248 #define UBIFS_MIN_JNL_LEBS (UBIFS_MIN_LOG_LEBS + UBIFS_MIN_BUD_LEBS)
249 /* Minimum number of LPT area logical eraseblocks */
250 #define UBIFS_MIN_LPT_LEBS 2
251 /* Minimum number of orphan area logical eraseblocks */
252 #define UBIFS_MIN_ORPH_LEBS 1
254 * Minimum number of main area logical eraseblocks (buds, 3 for the index, 1
255 * for GC, 1 for deletions, and at least 1 for committed data).
257 #define UBIFS_MIN_MAIN_LEBS (UBIFS_MIN_BUD_LEBS + 6)
259 /* Minimum number of logical eraseblocks */
260 #define UBIFS_MIN_LEB_CNT (UBIFS_SB_LEBS + UBIFS_MST_LEBS + \
261 UBIFS_MIN_LOG_LEBS + UBIFS_MIN_LPT_LEBS + \
262 UBIFS_MIN_ORPH_LEBS + UBIFS_MIN_MAIN_LEBS)
264 /* Node sizes (N.B. these are guaranteed to be multiples of 8) */
265 #define UBIFS_CH_SZ sizeof(struct ubifs_ch)
266 #define UBIFS_INO_NODE_SZ sizeof(struct ubifs_ino_node)
267 #define UBIFS_DATA_NODE_SZ sizeof(struct ubifs_data_node)
268 #define UBIFS_DENT_NODE_SZ sizeof(struct ubifs_dent_node)
269 #define UBIFS_TRUN_NODE_SZ sizeof(struct ubifs_trun_node)
270 #define UBIFS_PAD_NODE_SZ sizeof(struct ubifs_pad_node)
271 #define UBIFS_SB_NODE_SZ sizeof(struct ubifs_sb_node)
272 #define UBIFS_MST_NODE_SZ sizeof(struct ubifs_mst_node)
273 #define UBIFS_REF_NODE_SZ sizeof(struct ubifs_ref_node)
274 #define UBIFS_IDX_NODE_SZ sizeof(struct ubifs_idx_node)
275 #define UBIFS_CS_NODE_SZ sizeof(struct ubifs_cs_node)
276 #define UBIFS_ORPH_NODE_SZ sizeof(struct ubifs_orph_node)
277 #define UBIFS_AUTH_NODE_SZ sizeof(struct ubifs_auth_node)
278 /* Extended attribute entry nodes are identical to directory entry nodes */
279 #define UBIFS_XENT_NODE_SZ UBIFS_DENT_NODE_SZ
280 /* Only this does not have to be multiple of 8 bytes */
281 #define UBIFS_BRANCH_SZ sizeof(struct ubifs_branch)
283 /* Maximum node sizes (N.B. these are guaranteed to be multiples of 8) */
284 #define UBIFS_MAX_DATA_NODE_SZ (UBIFS_DATA_NODE_SZ + UBIFS_BLOCK_SIZE)
285 #define UBIFS_MAX_INO_NODE_SZ (UBIFS_INO_NODE_SZ + UBIFS_MAX_INO_DATA)
286 #define UBIFS_MAX_DENT_NODE_SZ (UBIFS_DENT_NODE_SZ + UBIFS_MAX_NLEN + 1)
287 #define UBIFS_MAX_XENT_NODE_SZ UBIFS_MAX_DENT_NODE_SZ
289 /* The largest UBIFS node */
290 #define UBIFS_MAX_NODE_SZ UBIFS_MAX_INO_NODE_SZ
292 /* The maxmimum size of a hash, enough for sha512 */
293 #define UBIFS_MAX_HASH_LEN 64
295 /* The maxmimum size of a hmac, enough for hmac(sha512) */
296 #define UBIFS_MAX_HMAC_LEN 64
299 * xattr name of UBIFS encryption context, we don't use a prefix
300 * nor a long name to not waste space on the flash.
302 #define UBIFS_XATTR_NAME_ENCRYPTION_CONTEXT "c"
306 * On-flash inode flags.
308 * UBIFS_COMPR_FL: use compression for this inode
309 * UBIFS_SYNC_FL: I/O on this inode has to be synchronous
310 * UBIFS_IMMUTABLE_FL: inode is immutable
311 * UBIFS_APPEND_FL: writes to the inode may only append data
312 * UBIFS_DIRSYNC_FL: I/O on this directory inode has to be synchronous
313 * UBIFS_XATTR_FL: this inode is the inode for an extended attribute value
314 * UBIFS_CRYPT_FL: use encryption for this inode
316 * Note, these are on-flash flags which correspond to ioctl flags
317 * (@FS_COMPR_FL, etc). They have the same values now, but generally, do not
318 * have to be the same.
321 UBIFS_COMPR_FL = 0x01,
322 UBIFS_SYNC_FL = 0x02,
323 UBIFS_IMMUTABLE_FL = 0x04,
324 UBIFS_APPEND_FL = 0x08,
325 UBIFS_DIRSYNC_FL = 0x10,
326 UBIFS_XATTR_FL = 0x20,
327 UBIFS_CRYPT_FL = 0x40,
330 /* Inode flag bits used by UBIFS */
331 #define UBIFS_FL_MASK 0x0000001F
334 * UBIFS compression algorithms.
336 * UBIFS_COMPR_NONE: no compression
337 * UBIFS_COMPR_LZO: LZO compression
338 * UBIFS_COMPR_ZLIB: ZLIB compression
339 * UBIFS_COMPR_TYPES_CNT: count of supported compression types
345 UBIFS_COMPR_TYPES_CNT,
351 * UBIFS_INO_NODE: inode node
352 * UBIFS_DATA_NODE: data node
353 * UBIFS_DENT_NODE: directory entry node
354 * UBIFS_XENT_NODE: extended attribute node
355 * UBIFS_TRUN_NODE: truncation node
356 * UBIFS_PAD_NODE: padding node
357 * UBIFS_SB_NODE: superblock node
358 * UBIFS_MST_NODE: master node
359 * UBIFS_REF_NODE: LEB reference node
360 * UBIFS_IDX_NODE: index node
361 * UBIFS_CS_NODE: commit start node
362 * UBIFS_ORPH_NODE: orphan node
363 * UBIFS_AUTH_NODE: authentication node
364 * UBIFS_NODE_TYPES_CNT: count of supported node types
366 * Note, we index arrays by these numbers, so keep them low and contiguous.
367 * Node type constants for inodes, direntries and so on have to be the same as
368 * corresponding key type constants.
384 UBIFS_NODE_TYPES_CNT,
390 * UBIFS_MST_DIRTY: rebooted uncleanly - master node is dirty
391 * UBIFS_MST_NO_ORPHS: no orphan inodes present
392 * UBIFS_MST_RCVRY: written by recovery
396 UBIFS_MST_NO_ORPHS = 2,
401 * Node group type (used by recovery to recover whole group or none).
403 * UBIFS_NO_NODE_GROUP: this node is not part of a group
404 * UBIFS_IN_NODE_GROUP: this node is a part of a group
405 * UBIFS_LAST_OF_NODE_GROUP: this node is the last in a group
408 UBIFS_NO_NODE_GROUP = 0,
410 UBIFS_LAST_OF_NODE_GROUP,
416 * UBIFS_FLG_BIGLPT: if "big" LPT model is used if set
417 * UBIFS_FLG_SPACE_FIXUP: first-mount "fixup" of free space within LEBs needed
418 * UBIFS_FLG_DOUBLE_HASH: store a 32bit cookie in directory entry nodes to
419 * support 64bit cookies for lookups by hash
420 * UBIFS_FLG_ENCRYPTION: this filesystem contains encrypted files
421 * UBIFS_FLG_AUTHENTICATION: this filesystem contains hashes for authentication
424 UBIFS_FLG_BIGLPT = 0x02,
425 UBIFS_FLG_SPACE_FIXUP = 0x04,
426 UBIFS_FLG_DOUBLE_HASH = 0x08,
427 UBIFS_FLG_ENCRYPTION = 0x10,
428 UBIFS_FLG_AUTHENTICATION = 0x20,
431 #define UBIFS_FLG_MASK (UBIFS_FLG_BIGLPT | UBIFS_FLG_SPACE_FIXUP | \
432 UBIFS_FLG_DOUBLE_HASH | UBIFS_FLG_ENCRYPTION | \
433 UBIFS_FLG_AUTHENTICATION)
436 * struct ubifs_ch - common header node.
437 * @magic: UBIFS node magic number (%UBIFS_NODE_MAGIC)
438 * @crc: CRC-32 checksum of the node header
439 * @sqnum: sequence number
440 * @len: full node length
441 * @node_type: node type
442 * @group_type: node group type
443 * @padding: reserved for future, zeroes
445 * Every UBIFS node starts with this common part. If the node has a key, the
446 * key always goes next.
459 * union ubifs_dev_desc - device node descriptor.
460 * @new: new type device descriptor
461 * @huge: huge type device descriptor
463 * This data structure describes major/minor numbers of a device node. In an
464 * inode is a device node then its data contains an object of this type. UBIFS
465 * uses standard Linux "new" and "huge" device node encodings.
467 union ubifs_dev_desc {
473 * struct ubifs_ino_node - inode node.
476 * @creat_sqnum: sequence number at time of creation
477 * @size: inode size in bytes (amount of uncompressed data)
478 * @atime_sec: access time seconds
479 * @ctime_sec: creation time seconds
480 * @mtime_sec: modification time seconds
481 * @atime_nsec: access time nanoseconds
482 * @ctime_nsec: creation time nanoseconds
483 * @mtime_nsec: modification time nanoseconds
484 * @nlink: number of hard links
487 * @mode: access flags
488 * @flags: per-inode flags (%UBIFS_COMPR_FL, %UBIFS_SYNC_FL, etc)
489 * @data_len: inode data length
490 * @xattr_cnt: count of extended attributes this inode has
491 * @xattr_size: summarized size of all extended attributes in bytes
492 * @padding1: reserved for future, zeroes
493 * @xattr_names: sum of lengths of all extended attribute names belonging to
495 * @compr_type: compression type used for this inode
496 * @padding2: reserved for future, zeroes
497 * @data: data attached to the inode
499 * Note, even though inode compression type is defined by @compr_type, some
500 * nodes of this inode may be compressed with different compressor - this
501 * happens if compression type is changed while the inode already has data
502 * nodes. But @compr_type will be use for further writes to the inode.
504 * Note, do not forget to amend 'zero_ino_node_unused()' function when changing
505 * the padding fields.
507 struct ubifs_ino_node {
509 __u8 key[UBIFS_MAX_KEY_LEN];
526 __u8 padding1[4]; /* Watch 'zero_ino_node_unused()' if changing! */
529 __u8 padding2[26]; /* Watch 'zero_ino_node_unused()' if changing! */
534 * struct ubifs_dent_node - directory entry node.
537 * @inum: target inode number
538 * @padding1: reserved for future, zeroes
539 * @type: type of the target inode (%UBIFS_ITYPE_REG, %UBIFS_ITYPE_DIR, etc)
541 * @cookie: A 32bits random number, used to construct a 64bits
543 * @name: zero-terminated name
545 * Note, do not forget to amend 'zero_dent_node_unused()' function when
546 * changing the padding fields.
548 struct ubifs_dent_node {
550 __u8 key[UBIFS_MAX_KEY_LEN];
560 * struct ubifs_data_node - data node.
563 * @size: uncompressed data size in bytes
564 * @compr_type: compression type (%UBIFS_COMPR_NONE, %UBIFS_COMPR_LZO, etc)
565 * @compr_size: compressed data size in bytes, only valid when data is encrypted
569 struct ubifs_data_node {
571 __u8 key[UBIFS_MAX_KEY_LEN];
579 * struct ubifs_trun_node - truncation node.
581 * @inum: truncated inode number
582 * @padding: reserved for future, zeroes
583 * @old_size: size before truncation
584 * @new_size: size after truncation
586 * This node exists only in the journal and never goes to the main area. Note,
587 * do not forget to amend 'zero_trun_node_unused()' function when changing the
590 struct ubifs_trun_node {
593 __u8 padding[12]; /* Watch 'zero_trun_node_unused()' if changing! */
599 * struct ubifs_pad_node - padding node.
601 * @pad_len: how many bytes after this node are unused (because padded)
602 * @padding: reserved for future, zeroes
604 struct ubifs_pad_node {
610 * struct ubifs_sb_node - superblock node.
612 * @padding: reserved for future, zeroes
613 * @key_hash: type of hash function used in keys
614 * @key_fmt: format of the key
615 * @flags: file-system flags (%UBIFS_FLG_BIGLPT, etc)
616 * @min_io_size: minimal input/output unit size
617 * @leb_size: logical eraseblock size in bytes
618 * @leb_cnt: count of LEBs used by file-system
619 * @max_leb_cnt: maximum count of LEBs used by file-system
620 * @max_bud_bytes: maximum amount of data stored in buds
621 * @log_lebs: log size in logical eraseblocks
622 * @lpt_lebs: number of LEBs used for lprops table
623 * @orph_lebs: number of LEBs used for recording orphans
624 * @jhead_cnt: count of journal heads
625 * @fanout: tree fanout (max. number of links per indexing node)
626 * @lsave_cnt: number of LEB numbers in LPT's save table
627 * @fmt_version: UBIFS on-flash format version
628 * @default_compr: default compression algorithm (%UBIFS_COMPR_LZO, etc)
629 * @padding1: reserved for future, zeroes
630 * @rp_uid: reserve pool UID
631 * @rp_gid: reserve pool GID
632 * @rp_size: size of the reserved pool in bytes
633 * @padding2: reserved for future, zeroes
634 * @time_gran: time granularity in nanoseconds
635 * @uuid: UUID generated when the file system image was created
636 * @ro_compat_version: UBIFS R/O compatibility version
637 * @hmac: HMAC to authenticate the superblock node
638 * @hmac_wkm: HMAC of a well known message (the string "UBIFS") as a convenience
639 * to the user to check if the correct key is passed.
640 * @hash_algo: The hash algo used for this filesystem (one of enum hash_algo)
642 struct ubifs_sb_node {
652 __le64 max_bud_bytes;
660 __le16 default_compr;
667 __le32 ro_compat_version;
668 __u8 hmac[UBIFS_MAX_HMAC_LEN];
669 __u8 hmac_wkm[UBIFS_MAX_HMAC_LEN];
675 * struct ubifs_mst_node - master node.
677 * @highest_inum: highest inode number in the committed index
678 * @cmt_no: commit number
679 * @flags: various flags (%UBIFS_MST_DIRTY, etc)
680 * @log_lnum: start of the log
681 * @root_lnum: LEB number of the root indexing node
682 * @root_offs: offset within @root_lnum
683 * @root_len: root indexing node length
684 * @gc_lnum: LEB reserved for garbage collection (%-1 value means the LEB was
685 * not reserved and should be reserved on mount)
686 * @ihead_lnum: LEB number of index head
687 * @ihead_offs: offset of index head
688 * @index_size: size of index on flash
689 * @total_free: total free space in bytes
690 * @total_dirty: total dirty space in bytes
691 * @total_used: total used space in bytes (includes only data LEBs)
692 * @total_dead: total dead space in bytes (includes only data LEBs)
693 * @total_dark: total dark space in bytes (includes only data LEBs)
694 * @lpt_lnum: LEB number of LPT root nnode
695 * @lpt_offs: offset of LPT root nnode
696 * @nhead_lnum: LEB number of LPT head
697 * @nhead_offs: offset of LPT head
698 * @ltab_lnum: LEB number of LPT's own lprops table
699 * @ltab_offs: offset of LPT's own lprops table
700 * @lsave_lnum: LEB number of LPT's save table (big model only)
701 * @lsave_offs: offset of LPT's save table (big model only)
702 * @lscan_lnum: LEB number of last LPT scan
703 * @empty_lebs: number of empty logical eraseblocks
704 * @idx_lebs: number of indexing logical eraseblocks
705 * @leb_cnt: count of LEBs used by file-system
706 * @hash_root_idx: the hash of the root index node
707 * @hash_lpt: the hash of the LPT
708 * @hmac: HMAC to authenticate the master node
709 * @padding: reserved for future, zeroes
711 struct ubifs_mst_node {
741 __u8 hash_root_idx[UBIFS_MAX_HASH_LEN];
742 __u8 hash_lpt[UBIFS_MAX_HASH_LEN];
743 __u8 hmac[UBIFS_MAX_HMAC_LEN];
748 * struct ubifs_ref_node - logical eraseblock reference node.
750 * @lnum: the referred logical eraseblock number
751 * @offs: start offset in the referred LEB
752 * @jhead: journal head number
753 * @padding: reserved for future, zeroes
755 struct ubifs_ref_node {
764 * struct ubifs_auth_node - node for authenticating other nodes
768 struct ubifs_auth_node {
774 * struct ubifs_branch - key/reference/length branch
775 * @lnum: LEB number of the target node
776 * @offs: offset within @lnum
777 * @len: target node length
780 * In an authenticated UBIFS we have the hash of the referenced node after @key.
781 * This can't be added to the struct type definition because @key is a
782 * dynamically sized element already.
784 struct ubifs_branch {
792 * struct ubifs_idx_node - indexing node.
794 * @child_cnt: number of child index nodes
796 * @branches: LEB number / offset / length / key branches
798 struct ubifs_idx_node {
806 * struct ubifs_cs_node - commit start node.
808 * @cmt_no: commit number
810 struct ubifs_cs_node {
816 * struct ubifs_orph_node - orphan node.
818 * @cmt_no: commit number (also top bit is set on the last node of the commit)
819 * @inos: inode numbers of orphans
821 struct ubifs_orph_node {
827 #endif /* __UBIFS_MEDIA_H__ */