[PATCH 2/2] ceph: don't clear write_congested when collecting folios
From: Tal Zussman
Date: Fri Sep 04 2026 - 13:09:20 EST
ceph_process_folio_batch() assigns the result of
is_write_congestion_happened() to fsc->write_congested for every folio
it collects. The code it replaced only ever set write_congested to true
here, leaving the decrement paths to clear it once writeback_count
drops below CONGESTION_OFF_THRESH. The unconditional assignment means
that a sync writeback that runs while the count sits between the off and
on thresholds clears the flag on its first folio, and background
writeback resumes early.
Only set the flag here, as before.
Fixes: ce80b76dd327 ("ceph: introduce ceph_process_folio_batch() method")
Assisted-by: Claude:fable-5.1
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
fs/ceph/addr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 69f2c4c8498a..7c9508fdc41a 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1469,7 +1469,8 @@ void ceph_process_folio_batch(struct address_space *mapping,
break;
}
- fsc->write_congested = is_write_congestion_happened(fsc);
+ if (is_write_congestion_happened(fsc))
+ fsc->write_congested = true;
ceph_wbc->fbatch.folios[i] = NULL;
ceph_wbc->len += folio_size(folio);
--
2.39.5