Linux EXT4 FS development
 help / color / mirror / Atom feed
* [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
  2026-11-30 12:23 ` Zhang Yi
  0 siblings, 2 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2026-11-30 12:23 UTC | newest]

Thread overview: 3+ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox