mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE
@ 2024-03-24 22:21 NeilBrown
  2024-03-24 23:45 ` Jeff Layton
  2024-03-25  1:28 ` Xiubo Li
  0 siblings, 2 replies; 3+ messages in thread
From: NeilBrown @ 2024-03-24 22:21 UTC (permalink / raw)
  To: Xiubo Li, Ilya Dryomov, Jeff Layton; +Cc: ceph-devel, linux-kernel


The page has been marked clean before writepage is called.  If we don't
redirty it before postponing the write, it might never get written.

Fixes: 503d4fa6ee28 ("ceph: remove reliance on bdi congestion")
Signed-off-by: NeilBrown <neilb@suse.de>
---
 fs/ceph/addr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 1340d77124ae..ee9caf7916fb 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -795,8 +795,10 @@ static int ceph_writepage(struct page *page, struct writeback_control *wbc)
 	ihold(inode);
 
 	if (wbc->sync_mode == WB_SYNC_NONE &&
-	    ceph_inode_to_fs_client(inode)->write_congested)
+	    ceph_inode_to_fs_client(inode)->write_congested) {
+		redirty_page_for_writepage(wbc, page);
 		return AOP_WRITEPAGE_ACTIVATE;
+	}
 
 	wait_on_page_fscache(page);
 
-- 
2.44.0


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

end of thread, other threads:[~2024-03-25  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-24 22:21 [PATCH] ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE NeilBrown
2024-03-24 23:45 ` Jeff Layton
2024-03-25  1:28 ` Xiubo Li

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

all inboxes | Powered by JetHome®