* [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro
@ 2025-07-15 3:12 Zhang Yi
2025-07-15 3:36 ` Baokun Li
2025-07-15 4:06 ` Theodore Ts'o
0 siblings, 2 replies; 4+ messages in thread
From: Zhang Yi @ 2025-07-15 3:12 UTC (permalink / raw)
To: linux-ext4
Cc: linux-fsdevel, linux-kernel, tytso, adilger.kernel, jack, ojaswin,
sfr, yi.zhang, yi.zhang, libaokun1, yukuai3, yangerkun
From: Zhang Yi <yi.zhang@huawei.com>
Since both the input and output parameters of the
EXT4_MAX_PAGECACHE_ORDER should be unsigned int type, switch to using
umin() instead of min(). This will silence the compile error reported by
_compiletime_assert() on powerpc.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20250715082230.7f5bcb1e@canb.auug.org.au/
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
---
fs/ext4/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 1bce9ebaedb7..6fd3692c4faf 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5204,7 +5204,7 @@ static bool ext4_should_enable_large_folio(struct inode *inode)
* where the PAGE_SIZE exceeds 4KB.
*/
#define EXT4_MAX_PAGECACHE_ORDER(i) \
- min(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
+ umin(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
void ext4_set_inode_mapping_order(struct inode *inode)
{
if (!ext4_should_enable_large_folio(inode))
--
2.46.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro
2025-07-15 3:12 [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro Zhang Yi
@ 2025-07-15 3:36 ` Baokun Li
2025-07-15 4:06 ` Theodore Ts'o
1 sibling, 0 replies; 4+ messages in thread
From: Baokun Li @ 2025-07-15 3:36 UTC (permalink / raw)
To: Zhang Yi
Cc: linux-fsdevel, linux-kernel, tytso, adilger.kernel, jack, ojaswin,
sfr, yi.zhang, yukuai3, yangerkun, linux-ext4
On 2025/7/15 11:12, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
>
> Since both the input and output parameters of the
> EXT4_MAX_PAGECACHE_ORDER should be unsigned int type, switch to using
> umin() instead of min(). This will silence the compile error reported by
> _compiletime_assert() on powerpc.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/all/20250715082230.7f5bcb1e@canb.auug.org.au/
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Looks good. Feel free to add:
Reviewed-by: Baokun Li <libaokun1@huawei.com>
> ---
> fs/ext4/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 1bce9ebaedb7..6fd3692c4faf 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -5204,7 +5204,7 @@ static bool ext4_should_enable_large_folio(struct inode *inode)
> * where the PAGE_SIZE exceeds 4KB.
> */
> #define EXT4_MAX_PAGECACHE_ORDER(i) \
> - min(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
> + umin(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
> void ext4_set_inode_mapping_order(struct inode *inode)
> {
> if (!ext4_should_enable_large_folio(inode))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro
2025-07-15 3:12 [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro Zhang Yi
2025-07-15 3:36 ` Baokun Li
@ 2025-07-15 4:06 ` Theodore Ts'o
2025-07-15 12:52 ` Zhang Yi
1 sibling, 1 reply; 4+ messages in thread
From: Theodore Ts'o @ 2025-07-15 4:06 UTC (permalink / raw)
To: Zhang Yi
Cc: linux-ext4, linux-fsdevel, linux-kernel, adilger.kernel, jack,
ojaswin, sfr, yi.zhang, libaokun1, yukuai3, yangerkun
On Tue, Jul 15, 2025 at 11:12:03AM +0800, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
>
> Since both the input and output parameters of the
> EXT4_MAX_PAGECACHE_ORDER should be unsigned int type, switch to using
> umin() instead of min(). This will silence the compile error reported by
> _compiletime_assert() on powerpc.
I've updated patch "ext4: limit the maximum folio order" with the
one-character change in the patch. Thanks for providing the fix, and
thanks for Stephe for reporting the build failure on PowerPC.
I've updated the dev and pu branches. (The proposed update patches
are the patch series that I'm currently testing and is under review.)
* e30451675144 - (HEAD -> pu, ext4/pu) Merge branch 'bl/scalable-allocations' into pu (9 minutes ago)
|\
| * abbcf4c5726d - (bl/scalable-allocations) ext4: implement linear-like traversal across order xarrays (10 minutes ago)
| * b81f9dc5d0ba - ext4: refactor choose group to scan group (10 minutes ago)
| * 7f4f2b5fcc3c - ext4: convert free groups order lists to xarrays (10 minutes ago)
| * e47286abe4d8 - ext4: factor out ext4_mb_scan_group() (10 minutes ago)
| * d1751cabc522 - ext4: factor out ext4_mb_might_prefetch() (10 minutes ago)
| * e91438837515 - ext4: factor out __ext4_mb_scan_group() (10 minutes ago)
| * 681eed57747a - ext4: fix largest free orders lists corruption on mb_optimize_scan switch (10 minutes ago)
| * f63c2c051c86 - ext4: fix zombie groups in average fragment size lists (10 minutes ago)
| * 985751249886 - ext4: merge freed extent with existing extents before insertion (10 minutes ago)
| * f73e72c088df - ext4: convert sbi->s_mb_free_pending to atomic_t (10 minutes ago)
| * 7963f5081eb7 - ext4: fix typo in CR_GOAL_LEN_SLOW comment (10 minutes ago)
| * fe14b9db818e - ext4: get rid of some obsolete EXT4_MB_HINT flags (10 minutes ago)
| * f9090356786d - ext4: utilize multiple global goals to reduce contention (10 minutes ago)
| * 83f7fa7c57df - ext4: remove unnecessary s_md_lock on update s_mb_last_group (10 minutes ago)
| * 79aef63bd0e5 - ext4: remove unnecessary s_mb_last_start (10 minutes ago)
| * b29898a8ca5c - ext4: separate stream goal hits from s_bal_goals for better tracking (10 minutes ago)
| * 7555f2d09299 - ext4: add ext4_try_lock_group() to skip busy groups (10 minutes ago)
* | 92c2926d33ce - Merge branch 'tt/dotdot' into pu (10 minutes ago)
|\ \
| |/
|/|
| * 4a1458d4d3a6 - (tt/dotdot) ext4: refactor the inline directory conversion and new directory codepaths (11 minutes ago)
| * c75c1d7897e5 - ext4: use memcpy() instead of strcpy() (11 minutes ago)
| * 63f1e6f25c71 - ext4: replace strcmp with direct comparison for '.' and '..' (11 minutes ago)
|/
* b12f423d598f - (ext4/dev, dev) ext4: limit the maximum folio order (15 minutes ago)
* 5137d6c8906b - ext4: fix insufficient credits calculation in ext4_meta_trans_blocks() (24 hours ago)
* 57661f28756c - ext4: replace ext4_writepage_trans_blocks() (24 hours ago)
* bbbf150f3f85 - ext4: reserved credits for one extent during the folio writeback (24 hours ago)
* 95ad8ee45cdb - ext4: correct the reserved credits for extent conversion (24 hours ago)
* 6b132759b0fe - ext4: enhance tracepoints during the folios writeback (24 hours ago)
* e2c4c49dee64 - ext4: restart handle if credits are insufficient during allocating blocks (24 hours ago)
* 2bddafea3d0d - ext4: refactor the block allocation process of ext4_page_mkwrite() (24 hours ago)
* ded2d726a304 - ext4: fix stale data if it bail out of the extents mapping loop (24 hours ago)
* f922c8c2461b - ext4: move the calculation of wbc->nr_to_write to mpage_folio_done() (24 hours ago)
* 1bfe6354e097 - ext4: process folios writeback in bytes (24 hours ago)
* a073e8577f18 - ext4: remove unused EXT_STATS macro from ext4_extents.h (2 days ago)
* c5da1f66940d - ext4: remove unnecessary duplicate check in ext4_map_blocks() (3 days ago)
* b6f3801727e4 - ext4: remove duplicate check for EXT4_FC_REPLAY (4 days ago)
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro
2025-07-15 4:06 ` Theodore Ts'o
@ 2025-07-15 12:52 ` Zhang Yi
0 siblings, 0 replies; 4+ messages in thread
From: Zhang Yi @ 2025-07-15 12:52 UTC (permalink / raw)
To: Theodore Ts'o
Cc: linux-ext4, linux-fsdevel, linux-kernel, adilger.kernel, jack,
ojaswin, sfr, yi.zhang, libaokun1, yukuai3, yangerkun
On 2025/7/15 12:06, Theodore Ts'o wrote:
> On Tue, Jul 15, 2025 at 11:12:03AM +0800, Zhang Yi wrote:
>> From: Zhang Yi <yi.zhang@huawei.com>
>>
>> Since both the input and output parameters of the
>> EXT4_MAX_PAGECACHE_ORDER should be unsigned int type, switch to using
>> umin() instead of min(). This will silence the compile error reported by
>> _compiletime_assert() on powerpc.
>
> I've updated patch "ext4: limit the maximum folio order" with the
> one-character change in the patch. Thanks for providing the fix, and
> thanks for Stephe for reporting the build failure on PowerPC.
>
> I've updated the dev and pu branches. (The proposed update patches
> are the patch series that I'm currently testing and is under review.)
Thank you for updating the original patch.
Best Regards,
Yi.
>
> * e30451675144 - (HEAD -> pu, ext4/pu) Merge branch 'bl/scalable-allocations' into pu (9 minutes ago)
> |\
> | * abbcf4c5726d - (bl/scalable-allocations) ext4: implement linear-like traversal across order xarrays (10 minutes ago)
> | * b81f9dc5d0ba - ext4: refactor choose group to scan group (10 minutes ago)
> | * 7f4f2b5fcc3c - ext4: convert free groups order lists to xarrays (10 minutes ago)
> | * e47286abe4d8 - ext4: factor out ext4_mb_scan_group() (10 minutes ago)
> | * d1751cabc522 - ext4: factor out ext4_mb_might_prefetch() (10 minutes ago)
> | * e91438837515 - ext4: factor out __ext4_mb_scan_group() (10 minutes ago)
> | * 681eed57747a - ext4: fix largest free orders lists corruption on mb_optimize_scan switch (10 minutes ago)
> | * f63c2c051c86 - ext4: fix zombie groups in average fragment size lists (10 minutes ago)
> | * 985751249886 - ext4: merge freed extent with existing extents before insertion (10 minutes ago)
> | * f73e72c088df - ext4: convert sbi->s_mb_free_pending to atomic_t (10 minutes ago)
> | * 7963f5081eb7 - ext4: fix typo in CR_GOAL_LEN_SLOW comment (10 minutes ago)
> | * fe14b9db818e - ext4: get rid of some obsolete EXT4_MB_HINT flags (10 minutes ago)
> | * f9090356786d - ext4: utilize multiple global goals to reduce contention (10 minutes ago)
> | * 83f7fa7c57df - ext4: remove unnecessary s_md_lock on update s_mb_last_group (10 minutes ago)
> | * 79aef63bd0e5 - ext4: remove unnecessary s_mb_last_start (10 minutes ago)
> | * b29898a8ca5c - ext4: separate stream goal hits from s_bal_goals for better tracking (10 minutes ago)
> | * 7555f2d09299 - ext4: add ext4_try_lock_group() to skip busy groups (10 minutes ago)
> * | 92c2926d33ce - Merge branch 'tt/dotdot' into pu (10 minutes ago)
> |\ \
> | |/
> |/|
> | * 4a1458d4d3a6 - (tt/dotdot) ext4: refactor the inline directory conversion and new directory codepaths (11 minutes ago)
> | * c75c1d7897e5 - ext4: use memcpy() instead of strcpy() (11 minutes ago)
> | * 63f1e6f25c71 - ext4: replace strcmp with direct comparison for '.' and '..' (11 minutes ago)
> |/
> * b12f423d598f - (ext4/dev, dev) ext4: limit the maximum folio order (15 minutes ago)
> * 5137d6c8906b - ext4: fix insufficient credits calculation in ext4_meta_trans_blocks() (24 hours ago)
> * 57661f28756c - ext4: replace ext4_writepage_trans_blocks() (24 hours ago)
> * bbbf150f3f85 - ext4: reserved credits for one extent during the folio writeback (24 hours ago)
> * 95ad8ee45cdb - ext4: correct the reserved credits for extent conversion (24 hours ago)
> * 6b132759b0fe - ext4: enhance tracepoints during the folios writeback (24 hours ago)
> * e2c4c49dee64 - ext4: restart handle if credits are insufficient during allocating blocks (24 hours ago)
> * 2bddafea3d0d - ext4: refactor the block allocation process of ext4_page_mkwrite() (24 hours ago)
> * ded2d726a304 - ext4: fix stale data if it bail out of the extents mapping loop (24 hours ago)
> * f922c8c2461b - ext4: move the calculation of wbc->nr_to_write to mpage_folio_done() (24 hours ago)
> * 1bfe6354e097 - ext4: process folios writeback in bytes (24 hours ago)
> * a073e8577f18 - ext4: remove unused EXT_STATS macro from ext4_extents.h (2 days ago)
> * c5da1f66940d - ext4: remove unnecessary duplicate check in ext4_map_blocks() (3 days ago)
> * b6f3801727e4 - ext4: remove duplicate check for EXT4_FC_REPLAY (4 days ago)
>
> - Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-15 12:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15 3:12 [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro Zhang Yi
2025-07-15 3:36 ` Baokun Li
2025-07-15 4:06 ` Theodore Ts'o
2025-07-15 12:52 ` Zhang Yi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).