Commit 6a28b5c
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>1 parent 8611e60 commit 6a28b5c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4191 | 4191 | | |
4192 | 4192 | | |
4193 | 4193 | | |
4194 | | - | |
| 4194 | + | |
4195 | 4195 | | |
4196 | 4196 | | |
4197 | 4197 | | |
| |||
4216 | 4216 | | |
4217 | 4217 | | |
4218 | 4218 | | |
4219 | | - | |
| 4219 | + | |
4220 | 4220 | | |
4221 | 4221 | | |
4222 | 4222 | | |
| |||
4239 | 4239 | | |
4240 | 4240 | | |
4241 | 4241 | | |
4242 | | - | |
| 4242 | + | |
4243 | 4243 | | |
4244 | 4244 | | |
4245 | 4245 | | |
| |||
0 commit comments