* [PATCH] ext4: mark extent tree block reads as metadata I/O
@ 2026-11-30 8:04 Xin Yin
2026-11-30 8:10 ` sashiko-bot
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Xin Yin @ 2026-11-30 8:04 UTC (permalink / raw)
To: tytso
Cc: adilger.kernel, libaokun, jack, ojaswin, ritesh.list, yi.zhang,
linux-ext4, Xin Yin
Extent tree lookups can issue synchronous reads under i_data_sem.
A writer holding an active journal handle can wait for that lock,
leaving journal commit waiting on I/O queued by blk-throttle under a
low read limit.
Submit extent tree block reads with REQ_META so blk-throttle can dispatch
the metadata promptly while still charging it to the issuing cgroup.
Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
---
fs/ext4/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index b65b0261ee5c..ec1ca2b90c7c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -578,7 +578,7 @@ __read_extent_tree_block(const char *function, unsigned int line,
if (!bh_uptodate_or_lock(bh)) {
trace_ext4_ext_load_extent(inode, pblk, _RET_IP_);
- err = ext4_read_bh(bh, 0, NULL, false);
+ err = ext4_read_bh(bh, REQ_META, NULL, false);
if (err < 0)
goto errout;
}
base-commit: 9437ee8b6cf607e883b36e44bd755968daaebd48
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: mark extent tree block reads as metadata I/O
2026-11-30 8:04 [PATCH] ext4: mark extent tree block reads as metadata I/O Xin Yin
@ 2026-11-30 8:10 ` sashiko-bot
2026-11-30 12:23 ` Zhang Yi
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-30 8:10 UTC (permalink / raw)
To: Xin Yin; +Cc: linux-ext4, tytso
> Extent tree lookups can issue synchronous reads under i_data_sem.
> A writer holding an active journal handle can wait for that lock,
> leaving journal commit waiting on I/O queued by blk-throttle under a
> low read limit.
>
> Submit extent tree block reads with REQ_META so blk-throttle can dispatch
> the metadata promptly while still charging it to the issuing cgroup.
>
> Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130080420.797601-1-yinxin.x@bytedance.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: mark extent tree block reads as metadata I/O
2026-11-30 8:04 [PATCH] ext4: mark extent tree block reads as metadata I/O Xin Yin
2026-11-30 8:10 ` sashiko-bot
@ 2026-11-30 12:23 ` Zhang Yi
2026-11-30 16:23 ` Jan Kara
2026-12-02 7:15 ` libaokun
3 siblings, 0 replies; 5+ messages in thread
From: Zhang Yi @ 2026-11-30 12:23 UTC (permalink / raw)
To: Xin Yin
Cc: tytso, adilger.kernel, libaokun, jack, ojaswin, ritesh.list,
linux-ext4
On 11/30/2026 4:04 PM, Xin Yin wrote:
> Extent tree lookups can issue synchronous reads under i_data_sem.
> A writer holding an active journal handle can wait for that lock,
> leaving journal commit waiting on I/O queued by blk-throttle under a
> low read limit.
>
> Submit extent tree block reads with REQ_META so blk-throttle can dispatch
> the metadata promptly while still charging it to the issuing cgroup.
>
> Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
This makes sense to me.
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
> ---
> fs/ext4/extents.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index b65b0261ee5c..ec1ca2b90c7c 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -578,7 +578,7 @@ __read_extent_tree_block(const char *function, unsigned int line,
>
> if (!bh_uptodate_or_lock(bh)) {
> trace_ext4_ext_load_extent(inode, pblk, _RET_IP_);
> - err = ext4_read_bh(bh, 0, NULL, false);
> + err = ext4_read_bh(bh, REQ_META, NULL, false);
> if (err < 0)
> goto errout;
> }
>
> base-commit: 9437ee8b6cf607e883b36e44bd755968daaebd48
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: mark extent tree block reads as metadata I/O
2026-11-30 8:04 [PATCH] ext4: mark extent tree block reads as metadata I/O Xin Yin
2026-11-30 8:10 ` sashiko-bot
2026-11-30 12:23 ` Zhang Yi
@ 2026-11-30 16:23 ` Jan Kara
2026-12-02 7:15 ` libaokun
3 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2026-11-30 16:23 UTC (permalink / raw)
To: Xin Yin
Cc: tytso, adilger.kernel, libaokun, jack, ojaswin, ritesh.list,
yi.zhang, linux-ext4
On Mon 30-11-26 16:04:20, Xin Yin wrote:
> Extent tree lookups can issue synchronous reads under i_data_sem.
> A writer holding an active journal handle can wait for that lock,
> leaving journal commit waiting on I/O queued by blk-throttle under a
> low read limit.
>
> Submit extent tree block reads with REQ_META so blk-throttle can dispatch
> the metadata promptly while still charging it to the issuing cgroup.
>
> Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/extents.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index b65b0261ee5c..ec1ca2b90c7c 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -578,7 +578,7 @@ __read_extent_tree_block(const char *function, unsigned int line,
>
> if (!bh_uptodate_or_lock(bh)) {
> trace_ext4_ext_load_extent(inode, pblk, _RET_IP_);
> - err = ext4_read_bh(bh, 0, NULL, false);
> + err = ext4_read_bh(bh, REQ_META, NULL, false);
> if (err < 0)
> goto errout;
> }
>
> base-commit: 9437ee8b6cf607e883b36e44bd755968daaebd48
> --
> 2.20.1
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: mark extent tree block reads as metadata I/O
2026-11-30 8:04 [PATCH] ext4: mark extent tree block reads as metadata I/O Xin Yin
` (2 preceding siblings ...)
2026-11-30 16:23 ` Jan Kara
@ 2026-12-02 7:15 ` libaokun
3 siblings, 0 replies; 5+ messages in thread
From: libaokun @ 2026-12-02 7:15 UTC (permalink / raw)
To: Xin Yin
Cc: tytso, adilger.kernel, libaokun, jack, ojaswin, ritesh.list,
yi.zhang, linux-ext4
On 2026/11/30 16:04, Xin Yin wrote:
> Extent tree lookups can issue synchronous reads under i_data_sem.
> A writer holding an active journal handle can wait for that lock,
> leaving journal commit waiting on I/O queued by blk-throttle under a
> low read limit.
>
> Submit extent tree block reads with REQ_META so blk-throttle can dispatch
> the metadata promptly while still charging it to the issuing cgroup.
>
> Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Looks good to me.
Reviewed-by: Baokun Li <libaokun@linux.alibaba.com>
> ---
> fs/ext4/extents.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index b65b0261ee5c..ec1ca2b90c7c 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -578,7 +578,7 @@ __read_extent_tree_block(const char *function, unsigned int line,
>
> if (!bh_uptodate_or_lock(bh)) {
> trace_ext4_ext_load_extent(inode, pblk, _RET_IP_);
> - err = ext4_read_bh(bh, 0, NULL, false);
> + err = ext4_read_bh(bh, REQ_META, NULL, false);
> if (err < 0)
> goto errout;
> }
>
> base-commit: 9437ee8b6cf607e883b36e44bd755968daaebd48
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-02 7:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 8:04 [PATCH] ext4: mark extent tree block reads as metadata I/O Xin Yin
2026-11-30 8:10 ` sashiko-bot
2026-11-30 12:23 ` Zhang Yi
2026-11-30 16:23 ` Jan Kara
2026-12-02 7:15 ` libaokun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.