Lines Matching refs:bg

72 	(struct ext2_block_group *bg, const struct ext_filesystem *fs)  in ext4fs_bg_free_inodes_dec()  argument
74 uint32_t free_inodes = le16_to_cpu(bg->free_inodes); in ext4fs_bg_free_inodes_dec()
76 free_inodes += le16_to_cpu(bg->free_inodes_high) << 16; in ext4fs_bg_free_inodes_dec()
79 bg->free_inodes = cpu_to_le16(free_inodes & 0xffff); in ext4fs_bg_free_inodes_dec()
81 bg->free_inodes_high = cpu_to_le16(free_inodes >> 16); in ext4fs_bg_free_inodes_dec()
85 (struct ext2_block_group *bg, const struct ext_filesystem *fs) in ext4fs_bg_free_blocks_dec() argument
87 uint32_t free_blocks = le16_to_cpu(bg->free_blocks); in ext4fs_bg_free_blocks_dec()
89 free_blocks += le16_to_cpu(bg->free_blocks_high) << 16; in ext4fs_bg_free_blocks_dec()
92 bg->free_blocks = cpu_to_le16(free_blocks & 0xffff); in ext4fs_bg_free_blocks_dec()
94 bg->free_blocks_high = cpu_to_le16(free_blocks >> 16); in ext4fs_bg_free_blocks_dec()
98 (struct ext2_block_group *bg, const struct ext_filesystem *fs) in ext4fs_bg_itable_unused_dec() argument
100 uint32_t free_inodes = le16_to_cpu(bg->bg_itable_unused); in ext4fs_bg_itable_unused_dec()
102 free_inodes += le16_to_cpu(bg->bg_itable_unused_high) << 16; in ext4fs_bg_itable_unused_dec()
105 bg->bg_itable_unused = cpu_to_le16(free_inodes & 0xffff); in ext4fs_bg_itable_unused_dec()
107 bg->bg_itable_unused_high = cpu_to_le16(free_inodes >> 16); in ext4fs_bg_itable_unused_dec()
123 uint32_t ext4fs_bg_get_free_blocks(const struct ext2_block_group *bg, in ext4fs_bg_get_free_blocks() argument
126 uint32_t free_blocks = le16_to_cpu(bg->free_blocks); in ext4fs_bg_get_free_blocks()
128 free_blocks += le16_to_cpu(bg->free_blocks_high) << 16; in ext4fs_bg_get_free_blocks()
133 uint32_t ext4fs_bg_get_free_inodes(const struct ext2_block_group *bg, in ext4fs_bg_get_free_inodes() argument
136 uint32_t free_inodes = le16_to_cpu(bg->free_inodes); in ext4fs_bg_get_free_inodes()
138 free_inodes += le16_to_cpu(bg->free_inodes_high) << 16; in ext4fs_bg_get_free_inodes()
142 static inline uint16_t ext4fs_bg_get_flags(const struct ext2_block_group *bg) in ext4fs_bg_get_flags() argument
144 return le16_to_cpu(bg->bg_flags); in ext4fs_bg_get_flags()
147 static inline void ext4fs_bg_set_flags(struct ext2_block_group *bg, in ext4fs_bg_set_flags() argument
150 bg->bg_flags = cpu_to_le16(flags); in ext4fs_bg_set_flags()
154 uint64_t ext4fs_bg_get_block_id(const struct ext2_block_group *bg, in ext4fs_bg_get_block_id() argument
157 uint64_t block_nr = le32_to_cpu(bg->block_id); in ext4fs_bg_get_block_id()
159 block_nr += (uint64_t)le32_to_cpu(bg->block_id_high) << 32; in ext4fs_bg_get_block_id()
164 uint64_t ext4fs_bg_get_inode_id(const struct ext2_block_group *bg, in ext4fs_bg_get_inode_id() argument
167 uint64_t block_nr = le32_to_cpu(bg->inode_id); in ext4fs_bg_get_inode_id()
169 block_nr += (uint64_t)le32_to_cpu(bg->inode_id_high) << 32; in ext4fs_bg_get_inode_id()
175 uint64_t ext4fs_bg_get_inode_table_id(const struct ext2_block_group *bg, in ext4fs_bg_get_inode_table_id() argument
178 uint64_t block_nr = le32_to_cpu(bg->inode_table_id); in ext4fs_bg_get_inode_table_id()
181 (uint64_t)le32_to_cpu(bg->inode_table_id_high) << 32; in ext4fs_bg_get_inode_table_id()