mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
@@ -3510,6 +3510,8 @@ static int ext4_mb_init_backend(struct super_block *sb)
|
||||
* this will avoid confusion if it ever shows up during debugging. */
|
||||
sbi->s_buddy_cache->i_ino = EXT4_BAD_INO;
|
||||
EXT4_I(sbi->s_buddy_cache)->i_disksize = 0;
|
||||
ext4_set_inode_mapping_order(sbi->s_buddy_cache);
|
||||
|
||||
for (i = 0; i < ngroups; i++) {
|
||||
cond_resched();
|
||||
desc = ext4_get_group_desc(sb, i, NULL);
|
||||
|
||||
Reference in New Issue
Block a user