linux/fs/ext4
Baokun Li 6a28b5c990 ext4: support large block size in ext4_calculate_overhead()
ext4_calculate_overhead() used a single page for its bitmap buffer, which
worked fine when PAGE_SIZE >= block size. However, with block size greater
than page size (BS > PS) support, the bitmap can exceed a single page.

To address this, we now use kvmalloc() to allocate memory of the filesystem
block size, to properly support BS > PS.

Suggested-by: Jan Kara <jack@suse.cz>
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-8-libaokun@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2025-11-28 22:35:26 -05:00
..
.kunitconfig
acl.c
acl.h Revert "ext4: apply umask if ACL support is disabled" 2024-05-02 18:25:39 -04:00
balloc.c fs/ext4: fix typo in comment 2025-11-26 17:13:34 -05:00
bitmap.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
block_validity.c ext4: make block validity check resistent to sb bh corruption 2025-04-12 22:01:37 -04:00
crypto.c ext4: move crypt info pointer to fs-specific part of inode 2025-08-21 13:58:07 +02:00
dir.c ext4: fix OOB read when checking dotdot dir 2025-03-21 01:33:11 -04:00
ext4_extents.h ext4: remove unused EXT_STATS macro from ext4_extents.h 2025-07-12 19:01:38 -04:00
ext4_jbd2.c ext4: wait for ongoing I/O to complete before freeing blocks 2025-10-10 13:34:35 -04:00
ext4_jbd2.h ext4/jbd2: convert jbd2_journal_blocks_per_page() to support large folio 2025-05-20 10:31:12 -04:00
ext4.h ext4: introduce s_min_folio_order for future BS > PS support 2025-11-28 22:35:26 -05:00
extents_status.c ext4: make ext4_es_lookup_extent() pass out the extent seq counter 2025-11-06 10:44:39 -05:00
extents_status.h ext4: make ext4_es_lookup_extent() pass out the extent seq counter 2025-11-06 10:44:39 -05:00
extents.c ext4: correct the comments place for EXT4_EXT_MAY_ZEROOUT 2025-11-26 17:13:34 -05:00
fast_commit.c ext4: increase IO priority of fastcommit 2025-09-25 14:56:31 -04:00
fast_commit.h ext4 fast_commit: make use of name_snapshot primitives 2025-01-27 19:24:43 -05:00
file.c ext4: fix checks for orphan inodes 2025-09-26 08:36:08 -04:00
fsmap.c ext4: correctly handle queries for metadata mappings 2025-09-25 23:04:48 -04:00
fsmap.h
fsync.c ext4: add ext4_emergency_state() helper function 2025-03-13 10:16:34 -04:00
hash.c ext4: make error code in __ext4fs_dirhash() consistent. 2025-11-06 10:32:33 -05:00
ialloc.c ext4: clear i_state_flags when alloc inode 2025-11-26 17:06:09 -05:00
indirect.c ext4: add ext4_sb_bread_nofail() helper function for ext4_free_branches() 2025-09-25 14:36:54 -04:00
inline.c ext4: add i_data_sem protection in ext4_destroy_inline_data_nolock() 2025-11-26 17:06:24 -05:00
inode-test.c ext4: add missing MODULE_DESCRIPTION() 2024-07-05 16:07:24 -04:00
inode.c ext4: introduce s_min_folio_order for future BS > PS support 2025-11-28 22:35:26 -05:00
ioctl.c ext4: check if mount_opts is NUL-terminated in ext4_ioctl_set_tune_sb() 2025-11-26 17:05:39 -05:00
Kconfig ext4: remove obsolete EXT3 config options 2025-09-25 14:47:05 -04:00
Makefile
mballoc-test.c ext4: convert free groups order lists to xarrays 2025-07-25 09:14:17 -04:00
mballoc.c ext4: improve integrity checking in __mb_check_buddy by enhancing order-0 validation 2025-11-26 17:13:33 -05:00
mballoc.h ext4: refactor choose group to scan group 2025-07-25 09:14:17 -04:00
migrate.c ext4: fix i_data_sem unlock order in ext4_ind_migrate() 2024-09-03 22:14:17 -04:00
mmp.c ext4: replace min/max nesting with clamp() 2025-09-25 14:35:21 -04:00
move_extent.c ext4: add two trace points for moving extents 2025-11-06 10:44:39 -05:00
namei.c fs: ext4: fix uninitialized symbols 2025-11-06 10:34:20 -05:00
orphan.c ext4: align max orphan file size with e2fsprogs limit 2025-11-26 17:13:34 -05:00
page-io.c ext4: remove redundant __GFP_NOWARN 2025-08-12 23:15:05 -04:00
readpage.c ext4: make ext4_mpage_readpages() support large folios 2025-05-20 10:31:11 -04:00
resize.c ext4: remove sb argument from ext4_superblock_csum() 2025-05-20 10:31:12 -04:00
super.c ext4: support large block size in ext4_calculate_overhead() 2025-11-28 22:35:26 -05:00
symlink.c ext4_get_link(): fix breakage in RCU mode 2024-02-25 02:10:32 -05:00
sysfs.c ext4: Make sb update interval tunable 2025-03-21 01:12:33 -04:00
truncate.h
verity.c ext4: move verity info pointer to fs-specific part of inode 2025-08-21 13:58:08 +02:00
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: xattr: fix null pointer deref in ext4_raw_inode() 2025-11-13 08:33:22 -05:00
xattr.h ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all() 2025-03-18 00:15:19 -04:00