Lines Matching +full:block +full:- +full:number

1 /*-
7 /*-
8 * SPDX-License-Identifier: BSD-2-Clause
43 * Super block for an ext2fs file system.
51 uint32_t e2fs_first_dblock; /* first data block */
52 uint32_t e2fs_log_bsize; /* block size = 1024*(2^e2fs_log_bsize) */
61 uint16_t e2fs_magic; /* magic number */
72 uint32_t e2fs_first_ino; /* first non-reserved inode */
74 uint16_t e2fs_block_group_nr; /* block grp number of this sblk*/
77 uint32_t e2fs_features_rocompat; /* RO-compatible feature set */
78 uint8_t e2fs_uuid[16]; /* 128-bit uuid for volume */
86 uint32_t e3fs_journal_inum; /* inode number of journal file */
87 uint32_t e3fs_journal_dev; /* device number of journal file */
94 uint32_t e3fs_first_meta_bg; /* First metablock block group */
105 uint64_t e4fs_mmpblk; /* block for multi-mount protection */
111 uint64_t e4fs_kbytes_written; /* number of lifetime kilobytes */
112 uint32_t e4fs_snapinum; /* inode number of active snapshot */
115 uint32_t e4fs_snaplist; /* inode number for on-disk snapshot */
116 uint32_t e4fs_errcount; /* number of file system errors */
119 uint64_t e4fs_first_errblk; /* block involved of first error */
121 uint32_t e4fs_first_errline; /* line number where error happened */
124 uint32_t e4fs_last_errline; /* line number where error happened */
125 uint64_t e4fs_last_errblk; /* block involved of last error */
137 uint32_t e4fs_reserved[98]; /* padding to the end of the block */
144 * the super block for this name.
149 * In-Memory Superblock
155 char e2fs_ronly; /* mounted read-only flag */
156 char e2fs_fmod; /* super block modified flag */
161 uint32_t e2fs_bsize; /* Block size */
162 uint32_t e2fs_bshift; /* calc of logical block no */
163 uint32_t e2fs_bpg; /* Number of blocks per group */
164 int64_t e2fs_qbmask; /* = s_blocksize -1 */
165 uint32_t e2fs_fsbtodb; /* Shift to get disk block */
166 uint32_t e2fs_ipg; /* Number of inodes per group */
167 uint32_t e2fs_ipb; /* Number of inodes per block */
168 uint32_t e2fs_itpg; /* Number of inode table per group */
169 uint32_t e2fs_fsize; /* Size of fragments per block */
170 uint32_t e2fs_fpb; /* Number of fragments per block */
171 uint32_t e2fs_fpg; /* Number of fragments per group */
172 uint32_t e2fs_gdbcount; /* Number of group descriptors */
173 uint32_t e2fs_gcount; /* Number of groups */
175 uint32_t e2fs_total_dir; /* Total number of directories */
196 * The second extended file system magic number
313 * - EXT2F_ROCOMPAT_SPARSESUPER
314 * - EXT2F_ROCOMPAT_LARGEFILE
315 * - EXT2F_ROCOMPAT_EXTRA_ISIZE
316 * - EXT2F_INCOMPAT_FTYPE
318 * We partially (read-only) support the following EXT4 features:
319 * - EXT2F_ROCOMPAT_HUGE_FILE
320 * - EXT2F_INCOMPAT_EXTENTS
339 * a kernel struct super_block. This will allow us to call the feature-test
347 ( le32toh(EXT2_SB(sb)->e2fs->e2fs_features_compat) & mask)
349 ( le32toh(EXT2_SB(sb)->e2fs->e2fs_features_rocompat) & mask)
351 ( le32toh(EXT2_SB(sb)->e2fs->e2fs_features_incompat) & mask)
366 #define EXT2_BG_BLOCK_UNINIT 0x0002 /* Block bitmap not in use */
367 #define EXT2_BG_INODE_ZEROED 0x0004 /* On-disk itable initialized to zero */
369 /* ext2 file system block group descriptor */
372 uint32_t ext2bgd_b_bitmap; /* blocks bitmap block */
373 uint32_t ext2bgd_i_bitmap; /* inodes bitmap block */
374 uint32_t ext2bgd_i_tables; /* inodes table block */
375 uint16_t ext2bgd_nbfree; /* number of free blocks */
376 uint16_t ext2bgd_nifree; /* number of free inodes */
377 uint16_t ext2bgd_ndirs; /* number of directories */
378 uint16_t ext4bgd_flags; /* block group flags */
380 uint16_t ext4bgd_b_bmap_csum; /* block bitmap checksum */
384 uint32_t ext4bgd_b_bitmap_hi; /* high bits of blocks bitmap block */
385 uint32_t ext4bgd_i_bitmap_hi; /* high bits of inodes bitmap block */
386 uint32_t ext4bgd_i_tables_hi; /* high bits of inodes table block */
387 uint16_t ext4bgd_nbfree_hi; /* high bits of number of free blocks */
388 uint16_t ext4bgd_nifree_hi; /* high bits of number of free inodes */
389 uint16_t ext4bgd_ndirs_hi; /* high bits of number of directories */
392 uint16_t ext4bgd_b_bmap_csum_hi;/* high bits of block bitmap checksum */
401 * Macro-instructions used to manage several block sizes
404 #define EXT2_BLOCK_SIZE(s) ((s)->e2fs_bsize)
406 #define EXT2_INODE_SIZE(s) (EXT2_SB(s)->e2fs_isize)
409 * Macro-instructions used to manage fragments
414 #define EXT2_FRAG_SIZE(s) (EXT2_SB(s)->e2fs_fsize)
415 #define EXT2_FRAGS_PER_BLOCK(s) (EXT2_SB(s)->e2fs_fpb)
418 * Macro-instructions used to manage group descriptors
420 #define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->e2fs_bpg)
422 EXT2F_INCOMPAT_64BIT) ? ((s)->e2fs_bsize / sizeof(struct ext2_gd)) : \
423 ((s)->e2fs_bsize / E2FS_REV0_GD_SIZE))
426 * Macro-instructions used to manage inodes
428 #define EXT2_FIRST_INO(s) (le32toh((EXT2_SB(s)->e2fs->e2fs_rev) == \
429 E2FS_REV0) ? EXT2_FIRSTINO : le32toh(EXT2_SB(s)->e2fs->e2fs_first_ino))
436 #define EXT2_MINOR_MAX ((1 << EXT2_MINORBITS) - 1)