Lines Matching +full:group +full:- +full:index +full:- +full:bits

1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * On-disk structures for OCFS2.
59 ( OCFS2_SB(sb)->s_feature_compat & (mask) )
61 ( OCFS2_SB(sb)->s_feature_ro_compat & (mask) )
63 ( OCFS2_SB(sb)->s_feature_incompat & (mask) )
65 OCFS2_SB(sb)->s_feature_compat |= (mask)
67 OCFS2_SB(sb)->s_feature_ro_compat |= (mask)
69 OCFS2_SB(sb)->s_feature_incompat |= (mask)
71 OCFS2_SB(sb)->s_feature_compat &= ~(mask)
73 OCFS2_SB(sb)->s_feature_ro_compat &= ~(mask)
75 OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
96 * Heartbeat-only devices are missing journals and other files. The
105 * after an aborted run without fsck-ing.
109 /* Used to denote a non-clustered volume */
112 /* Support for sparse allocation in b-trees */
119 * fsck-ing.
177 * The filesystem will correctly handle journal feature bits.
230 * keep in mind that i_dyn_features is only 16 bits wide.
252 /* End compression flags --- maybe not all used */
254 #define OCFS2_INDEX_FL FS_INDEX_FL /* hash-indexed directory */
291 #define OCFS2_INVALID_SLOT ((u16)-1)
323 /* System file index */
348 (NUM_SYSTEM_INODES - OCFS2_FIRST_LOCAL_SYSTEM_INODE)
361 [GROUP_QUOTA_SYSTEM_INODE] = { "aquota.group", OCFS2_QUOTA_FL, S_IFREG | 0644 },
363 /* Slot-specific system inodes (one copy per slot) */
371 [LOCAL_GROUP_QUOTA_SYSTEM_INODE] = { "aquota.group:%04d", OCFS2_QUOTA_FL, S_IFREG | 0644 },
385 #define OCFS2_DIR_ROUND (OCFS2_DIR_PAD - 1)
393 #define OCFS2_DX_LINK_MAX ((1U << 31) - 1U)
401 #define OCFS2_RAW_SB(dinode) (&((dinode)->id2.i_super))
410 __le16 bc_ecc; /* Single-error-correction parity vector.
413 blocksize, 4K, requires 16 parity bits,
442 __le32 c_free; /* Number of free bits in this chain. */
443 __le32 c_total; /* Number of total bits in this chain */
444 __le64 c_blkno; /* Physical disk offset (blocks) of 1st group */
463 NOTE: The high 8 bits cannot be
464 used - tree_depth is never that big.
480 /*00*/ __le16 cl_cpg; /* Clusters per Block Group */
481 __le16 cl_bpc; /* Bits per cluster */
510 block group */
513 /*20*/ __le64 h_suballoc_loc; /* Suballocator block group this
516 discontiguous block group */
521 /* Actual on-disk size is one block */
527 * value -1 (0xFFFF) is OCFS2_INVALID_SLOT. This marks a slot empty.
532 * Actual on-disk size is one block. OCFS2_MAX_SLOTS is 255,
594 __le32 s_feature_ro_compat; /* Readonly-compatible feature set */
606 * group header */
608 /*90*/ __u8 s_uuid[OCFS2_VOL_UUID_LEN]; /* 128-bit uuid */
615 __le32 s_dx_seed[3]; /* seed[0-2] for dx dir hash.
645 * Data-in-inode header. This is only used if i_dyn_features has
666 block group */
667 /*10*/ __le16 i_links_count_hi; /* High 16 bits of links count */
683 /*60*/ __le32 i_fs_generation; /* Generation per fs-instance */
693 /*88*/ __le64 i_dx_root; /* Pointer to dir index root block */
695 __le64 i_suballoc_loc; /* Suballocator block group this
698 discontiguous block group */
710 __le32 i_used; /* Bits (ie, clusters) used */
711 __le32 i_total; /* Total bits (clusters)
732 /* Actual on-disk size is one block */
736 * On-disk directory entry structure for OCFS2
738 * Packed as this structure could be accessed unaligned on 64-bit platforms
746 /* Actual on-disk length specified by rec_len */
750 * Per-block record for the unindexed directory btree. This is carefully
786 * cluster in index */
787 __le32 dx_minor_hash; /* Lower bits used to find
811 * start-of-list pointers.
819 * block group */
836 __le64 dr_suballoc_loc; /* Suballocator block group
840 block group */
844 * bits for maximum space
846 struct ocfs2_dx_entry_list dr_entries; /* In-root-block list of
867 * Largest bitmap for a block (suballocator) group in bytes. This limit
868 * does not affect cluster groups (global allocator). Cluster group
874 * On disk allocator group structure for OCFS2
881 __le16 bg_bits; /* Bits represented by this
882 group. */
883 __le16 bg_free_bits_count; /* Free bits count */
886 __le16 bg_contig_free_bits; /* max contig free bits length */
888 __le64 bg_next_group; /* Next group in my list, in
901 * The extents of a discontiguous block group are
904 * discontiguous group is signified by a non-zero
905 * bg_list->l_next_free_rec. Only block groups
907 * We've never made a block group with more than
910 * bg_size of a discontiguous block group will
917 /* Actual on-disk size is one block */
946 block group */
962 __le64 rf_suballoc_loc; /* Suballocator block group this
965 discontiguous block group */
975 /* Actual on-disk size is one block */
993 __u8 xe_type; /* the low 7 bits indicate the name prefix
1030 * b-tree like file data. The xattr value root points to this structure.
1043 * attributes will be organized and stored in an indexed-btree.
1070 block group */
1078 __le64 xb_suballoc_loc; /* Suballocator block group this
1081 discontiguous block group */
1097 xe->xe_type |= OCFS2_XATTR_ENTRY_LOCAL; in ocfs2_xattr_set_local()
1099 xe->xe_type &= ~OCFS2_XATTR_ENTRY_LOCAL; in ocfs2_xattr_set_local()
1104 return xe->xe_type & OCFS2_XATTR_ENTRY_LOCAL; in ocfs2_xattr_is_local()
1109 xe->xe_type |= type & OCFS2_XATTR_TYPE_MASK; in ocfs2_xattr_set_type()
1114 return xe->xe_type & OCFS2_XATTR_TYPE_MASK; in ocfs2_xattr_get_type()
1159 /* Structure with global user / group information. We reserve some space
1177 * On-disk structures for local quota file
1234 ptr += blocksize - OCFS2_QBLK_RESERVED_SPACE; in ocfs2_block_dqtrailer()
1242 return sb->s_blocksize - in ocfs2_fast_symlink_chars()
1249 unsigned int xattrsize = le16_to_cpu(di->i_xattr_inline_size); in ocfs2_max_inline_data_with_xattr()
1251 if (le16_to_cpu(di->i_dyn_features) & OCFS2_INLINE_XATTR_FL) in ocfs2_max_inline_data_with_xattr()
1252 return sb->s_blocksize - in ocfs2_max_inline_data_with_xattr()
1253 offsetof(struct ocfs2_dinode, id2.i_data.id_data) - in ocfs2_max_inline_data_with_xattr()
1256 return sb->s_blocksize - in ocfs2_max_inline_data_with_xattr()
1264 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode()
1275 unsigned int xattrsize = le16_to_cpu(di->i_xattr_inline_size); in ocfs2_extent_recs_per_inode_with_xattr()
1277 if (le16_to_cpu(di->i_dyn_features) & OCFS2_INLINE_XATTR_FL) in ocfs2_extent_recs_per_inode_with_xattr()
1278 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr()
1279 offsetof(struct ocfs2_dinode, id2.i_list.l_recs) - in ocfs2_extent_recs_per_inode_with_xattr()
1282 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr()
1292 size = sb->s_blocksize - in ocfs2_extent_recs_per_dx_root()
1302 size = sb->s_blocksize - in ocfs2_chain_recs_per_inode()
1312 size = sb->s_blocksize - in ocfs2_extent_recs_per_eb()
1322 size = sb->s_blocksize - in ocfs2_extent_recs_per_gd()
1332 size = sb->s_blocksize - in ocfs2_dx_entries_per_leaf()
1342 size = sb->s_blocksize - in ocfs2_dx_entries_per_root()
1352 size = sb->s_blocksize - in ocfs2_local_alloc_size()
1362 int size = sb->s_blocksize - in ocfs2_group_bitmap_size()
1369 * bg_size as-is unless discontig_bg is enabled. in ocfs2_group_bitmap_size()
1382 size = sb->s_blocksize - in ocfs2_truncate_recs_per_inode()
1388 static inline u64 ocfs2_backup_super_blkno(struct super_block *sb, int index) in ocfs2_backup_super_blkno() argument
1392 if (index >= 0 && index < OCFS2_MAX_BACKUP_SUPERBLOCKS) { in ocfs2_backup_super_blkno()
1393 offset <<= (2 * index); in ocfs2_backup_super_blkno()
1394 offset >>= sb->s_blocksize_bits; in ocfs2_backup_super_blkno()
1406 size = sb->s_blocksize - in ocfs2_xattr_recs_per_xb()
1417 size = sb->s_blocksize - in ocfs2_extent_recs_per_rb()
1427 size = sb->s_blocksize - in ocfs2_refcount_recs_per_rb()
1436 return le64_to_cpu(rec->r_cpos) & OCFS2_32BIT_POS_MASK; in ocfs2_get_ref_rec_low_cpos()
1441 return blocksize - offsetof(struct ocfs2_dinode, id2.i_symlink); in ocfs2_fast_symlink_chars()
1447 if (di && (di->i_dyn_features & OCFS2_INLINE_XATTR_FL)) in ocfs2_max_inline_data_with_xattr()
1448 return blocksize - in ocfs2_max_inline_data_with_xattr()
1449 offsetof(struct ocfs2_dinode, id2.i_data.id_data) - in ocfs2_max_inline_data_with_xattr()
1450 di->i_xattr_inline_size; in ocfs2_max_inline_data_with_xattr()
1452 return blocksize - in ocfs2_max_inline_data_with_xattr()
1460 size = blocksize - in ocfs2_extent_recs_per_inode()
1470 size = blocksize - in ocfs2_chain_recs_per_inode()
1480 size = blocksize - in ocfs2_extent_recs_per_eb()
1490 size = blocksize - in ocfs2_extent_recs_per_gd()
1500 size = blocksize - in ocfs2_local_alloc_size()
1510 int size = sb->s_blocksize - in ocfs2_group_bitmap_size()
1517 * bg_size as-is unless discontig_bg is enabled. in ocfs2_group_bitmap_size()
1530 size = blocksize - in ocfs2_truncate_recs_per_inode()
1536 static inline uint64_t ocfs2_backup_super_blkno(int blocksize, int index) in ocfs2_backup_super_blkno() argument
1540 if (index >= 0 && index < OCFS2_MAX_BACKUP_SUPERBLOCKS) { in ocfs2_backup_super_blkno()
1541 offset <<= (2 * index); in ocfs2_backup_super_blkno()
1553 size = blocksize - in ocfs2_xattr_recs_per_xb()
1592 de->file_type = fs_umode_to_ftype(mode); in ocfs2_set_de_type()
1598 le16_to_cpu(gd->bg_size)) != in ocfs2_gd_is_discontig()
1605 if (!gd->bg_list.l_next_free_rec) in ocfs2_gd_is_discontig()