Commit 709f0f1
ext4: add checks for large folio incompatibilities when BS > PS
Supporting a block size greater than the page size (BS > PS) requires
support for large folios. However, several features (e.g., encrypt)
do not yet support large folios.
To prevent conflicts, this patch adds checks at mount time to prohibit
these features from being used when BS > PS. Since these features cannot
be changed on remount, there is no need to check on remount.
This patch adds s_max_folio_order, initialized during mount according to
filesystem features and mount options. If s_max_folio_order is 0, large
folios are disabled.
With this in place, ext4_set_inode_mapping_order() can be simplified by
checking s_max_folio_order, avoiding redundant checks.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Message-ID: <20251121090654.631996-24-libaokun@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 1a3e9e8 commit 709f0f1
3 files changed
Lines changed: 52 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1705 | 1705 | | |
1706 | 1706 | | |
1707 | 1707 | | |
1708 | | - | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1709 | 1711 | | |
1710 | 1712 | | |
1711 | 1713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5148 | 5148 | | |
5149 | 5149 | | |
5150 | 5150 | | |
5151 | | - | |
| 5151 | + | |
5152 | 5152 | | |
5153 | 5153 | | |
| 5154 | + | |
5154 | 5155 | | |
5155 | | - | |
5156 | | - | |
5157 | | - | |
5158 | | - | |
5159 | | - | |
5160 | | - | |
5161 | | - | |
5162 | | - | |
5163 | | - | |
5164 | | - | |
5165 | | - | |
5166 | | - | |
5167 | | - | |
5168 | | - | |
5169 | | - | |
5170 | | - | |
5171 | | - | |
5172 | | - | |
| 5156 | + | |
| 5157 | + | |
| 5158 | + | |
5173 | 5159 | | |
5174 | | - | |
| 5160 | + | |
| 5161 | + | |
5175 | 5162 | | |
5176 | 5163 | | |
5177 | | - | |
5178 | | - | |
5179 | | - | |
5180 | | - | |
5181 | | - | |
| 5164 | + | |
| 5165 | + | |
5182 | 5166 | | |
5183 | | - | |
5184 | | - | |
5185 | | - | |
| 5167 | + | |
5186 | 5168 | | |
5187 | 5169 | | |
5188 | 5170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5042 | 5042 | | |
5043 | 5043 | | |
5044 | 5044 | | |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
| 5049 | + | |
| 5050 | + | |
| 5051 | + | |
| 5052 | + | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
| 5063 | + | |
| 5064 | + | |
| 5065 | + | |
| 5066 | + | |
| 5067 | + | |
| 5068 | + | |
| 5069 | + | |
| 5070 | + | |
| 5071 | + | |
| 5072 | + | |
| 5073 | + | |
| 5074 | + | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
5045 | 5080 | | |
5046 | 5081 | | |
5047 | 5082 | | |
| |||
5318 | 5353 | | |
5319 | 5354 | | |
5320 | 5355 | | |
| 5356 | + | |
| 5357 | + | |
| 5358 | + | |
| 5359 | + | |
5321 | 5360 | | |
5322 | 5361 | | |
5323 | 5362 | | |
| |||
0 commit comments