public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: don't allow log recover IO to be throttled
@ 2025-03-03 11:23 Jinliang Zheng
  2025-03-03 14:08 ` Christoph Hellwig
  2025-03-03 20:45 ` Dave Chinner
  0 siblings, 2 replies; 5+ messages in thread
From: Jinliang Zheng @ 2025-03-03 11:23 UTC (permalink / raw)
  To: cem, djwong, dchinner; +Cc: alexjlzheng, linux-xfs, linux-kernel

When recovering a large filesystem, avoid log recover IO being
throttled by rq_qos_throttle().

Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
---
 fs/xfs/xfs_bio_io.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_bio_io.c b/fs/xfs/xfs_bio_io.c
index fe21c76f75b8..259955f2aeb2 100644
--- a/fs/xfs/xfs_bio_io.c
+++ b/fs/xfs/xfs_bio_io.c
@@ -22,12 +22,15 @@ xfs_rw_bdev(
 	unsigned int		left = count;
 	int			error;
 	struct bio		*bio;
+	blk_opf_t		opf = op | REQ_META | REQ_SYNC;
 
 	if (is_vmalloc && op == REQ_OP_WRITE)
 		flush_kernel_vmap_range(data, count);
 
-	bio = bio_alloc(bdev, bio_max_vecs(left), op | REQ_META | REQ_SYNC,
-			GFP_KERNEL);
+	if (op == REQ_OP_WRITE)
+		opf |= REQ_IDLE;
+
+	bio = bio_alloc(bdev, bio_max_vecs(left), opf, GFP_KERNEL);
 	bio->bi_iter.bi_sector = sector;
 
 	do {
-- 
2.41.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-10 13:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-03 11:23 [PATCH] xfs: don't allow log recover IO to be throttled Jinliang Zheng
2025-03-03 14:08 ` Christoph Hellwig
2025-03-03 20:45 ` Dave Chinner
2025-03-09 12:41   ` Jinliang Zheng
2025-03-10 13:17     ` Carlos Maiolino

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