Lines Matching +full:cluster +full:- +full:index
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
13 * With AGGRESSIVE_TEST defined, the capacity of index/leaf blocks
14 * becomes very small, so index split, in-depth growing and
44 * For non-inode extent blocks, ext4_extent_tail
49 * This is the extent tail on-disk structure.
60 * This is the extent on-disk structure.
71 * This is index on-disk structure.
75 __le32 ei_block; /* index covers logical blocks from 'block' */
77 * level. leaf or next index could be there */
83 * Each block (leaves and indexes), even inode-stored has header.
98 (sizeof(struct ext4_extent) * le16_to_cpu((hdr)->eh_max)))
123 * Used to record a portion of a cluster found at the beginning or end
125 * A partial cluster may be removed if it does not contain blocks shared
130 ext4_fsblk_t pclu; /* physical cluster number */
131 ext4_lblk_t lblk; /* logical block number within logical cluster */
141 * initialized extent. This is 2^15 and not (2^16 - 1), since we use the
152 * This way we get better extent-to-group alignment for initialized extents.
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()
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()
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()
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()