Skip to content

Commit 31daa82

Browse files
LiBaokun96tytso
authored andcommitted
ext4: prepare buddy cache inode for BS > PS with large folios
We use EXT4_BAD_INO for the buddy cache inode number. This inode is not accessed via __ext4_new_inode() or __ext4_iget(), meaning ext4_set_inode_mapping_order() is not called to set its folio order range. However, future block size greater than page size support requires this inode to support large folios, and the buddy cache code already handles BS > PS. Therefore, ext4_set_inode_mapping_order() is now explicitly called for this specific inode to set its folio order range. Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> Message-ID: <20251121090654.631996-15-libaokun@huaweicloud.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 0ad55fa commit 31daa82

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/ext4/mballoc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3510,6 +3510,8 @@ static int ext4_mb_init_backend(struct super_block *sb)
35103510
* this will avoid confusion if it ever shows up during debugging. */
35113511
sbi->s_buddy_cache->i_ino = EXT4_BAD_INO;
35123512
EXT4_I(sbi->s_buddy_cache)->i_disksize = 0;
3513+
ext4_set_inode_mapping_order(sbi->s_buddy_cache);
3514+
35133515
for (i = 0; i < ngroups; i++) {
35143516
cond_resched();
35153517
desc = ext4_get_group_desc(sb, i, NULL);

0 commit comments

Comments
 (0)