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

1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
14 * becomes very small, so index split, in-depth growing and
21 * With EXTENTS_STATS defined, the number of blocks and extents
35 * These number will be displayed at umount time.
44 * For non-inode extent blocks, ext4_extent_tail
49 * This is the extent tail on-disk structure.
52 * covers all valid ext4 block sizes. Therefore, this tail structure can be
53 * crammed into the end of the block without having to rebalance the tree.
60 * This is the extent on-disk structure.
64 __le32 ee_block; /* first logical block extent covers */
65 __le16 ee_len; /* number of blocks covered by extent */
66 __le16 ee_start_hi; /* high 16 bits of physical block */
67 __le32 ee_start_lo; /* low 32 bits of physical block */
71 * This is index on-disk structure.
75 __le32 ei_block; /* index covers logical blocks from 'block' */
76 __le32 ei_leaf_lo; /* pointer to the physical block of the next *
78 __le16 ei_leaf_hi; /* high 16 bits of physical block */
83 * Each block (leaves and indexes), even inode-stored has header.
87 __le16 eh_entries; /* number of valid entries */
98 (sizeof(struct ext4_extent) * le16_to_cpu((hdr)->eh_max)))
130 ext4_fsblk_t pclu; /* physical cluster number */
131 ext4_lblk_t lblk; /* logical block number within logical cluster */
140 * EXT_INIT_MAX_LEN is the maximum number of blocks we can have in an
141 * initialized extent. This is 2^15 and not (2^16 - 1), since we use the
145 * EXT_UNWRITTEN_MAX_LEN is the maximum number of blocks we can have in an
152 * This way we get better extent-to-group alignment for initialized extents.
153 * Hence, the maximum number of blocks we can have in an *initialized*
154 * extent is 2^15 (32768) and in an *unwritten* extent is 2^15-1 (32767).
157 #define EXT_UNWRITTEN_MAX_LEN (EXT_INIT_MAX_LEN - 1)
167 (le16_to_cpu((__path__)->p_hdr->eh_entries) \
168 < le16_to_cpu((__path__)->p_hdr->eh_max))
170 (EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_entries) - 1)
172 (EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_entries) - 1)
174 ((le16_to_cpu((__hdr__)->eh_max)) ? \
175 ((EXT_FIRST_EXTENT((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)) \
178 ((le16_to_cpu((__hdr__)->eh_max)) ? \
179 ((EXT_FIRST_INDEX((__hdr__)) + le16_to_cpu((__hdr__)->eh_max) - 1)) \
184 return (struct ext4_extent_header *) EXT4_I(inode)->i_data; in ext_inode_hdr()
189 return (struct ext4_extent_header *) bh->b_data; in ext_block_hdr()
194 return le16_to_cpu(ext_inode_hdr(inode)->eh_depth); in ext_depth()
200 BUG_ON((le16_to_cpu(ext->ee_len) & ~EXT_INIT_MAX_LEN) == 0); in ext4_ext_mark_unwritten()
201 ext->ee_len |= cpu_to_le16(EXT_INIT_MAX_LEN); in ext4_ext_mark_unwritten()
207 return (le16_to_cpu(ext->ee_len) > EXT_INIT_MAX_LEN); in ext4_ext_is_unwritten()
212 return (le16_to_cpu(ext->ee_len) <= EXT_INIT_MAX_LEN ? in ext4_ext_get_actual_len()
213 le16_to_cpu(ext->ee_len) : in ext4_ext_get_actual_len()
214 (le16_to_cpu(ext->ee_len) - EXT_INIT_MAX_LEN)); in ext4_ext_get_actual_len()
219 ext->ee_len = cpu_to_le16(ext4_ext_get_actual_len(ext)); in ext4_ext_mark_initialized()
224 * combine low and high parts of physical block number into ext4_fsblk_t
228 ext4_fsblk_t block; in ext4_ext_pblock() local
230 block = le32_to_cpu(ex->ee_start_lo); in ext4_ext_pblock()
231 block |= ((ext4_fsblk_t) le16_to_cpu(ex->ee_start_hi) << 31) << 1; in ext4_ext_pblock()
232 return block; in ext4_ext_pblock()
237 * combine low and high parts of a leaf physical block number into ext4_fsblk_t
241 ext4_fsblk_t block; in ext4_idx_pblock() local
243 block = le32_to_cpu(ix->ei_leaf_lo); in ext4_idx_pblock()
244 block |= ((ext4_fsblk_t) le16_to_cpu(ix->ei_leaf_hi) << 31) << 1; in ext4_idx_pblock()
245 return block; in ext4_idx_pblock()
250 * stores a large physical block number into an extent struct,
256 ex->ee_start_lo = cpu_to_le32((unsigned long) (pb & 0xffffffff)); in ext4_ext_store_pblock()
257 ex->ee_start_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & in ext4_ext_store_pblock()
263 * stores a large physical block number into an index struct,
269 ix->ei_leaf_lo = cpu_to_le32((unsigned long) (pb & 0xffffffff)); in ext4_idx_store_pblock()
270 ix->ei_leaf_hi = cpu_to_le16((unsigned long) ((pb >> 31) >> 1) & in ext4_idx_store_pblock()