* [PATCH] ceph: redirty the page for wirtepage if fails
@ 2022-04-24 9:39 Xiubo Li
2022-04-25 19:04 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: Xiubo Li @ 2022-04-24 9:39 UTC (permalink / raw)
To: jlayton; +Cc: idryomov, vshankar, ceph-devel, Xiubo Li
When run out of memories we should redirty the page before failing
the writepage. Or we will hit BUG_ON(folio_get_private(folio)) in
ceph_dirty_folio().
URL: https://tracker.ceph.com/issues/55421
Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
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 261bc8bb2ab8..656bc0ca7a78 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -606,8 +606,10 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
CEPH_OSD_OP_WRITE, CEPH_OSD_FLAG_WRITE, snapc,
ceph_wbc.truncate_seq, ceph_wbc.truncate_size,
true);
- if (IS_ERR(req))
+ if (IS_ERR(req)) {
+ redirty_page_for_writepage(wbc, page);
return PTR_ERR(req);
+ }
set_page_writeback(page);
if (caching)
--
2.36.0.rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: redirty the page for wirtepage if fails
2022-04-24 9:39 [PATCH] ceph: redirty the page for wirtepage if fails Xiubo Li
@ 2022-04-25 19:04 ` Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2022-04-25 19:04 UTC (permalink / raw)
To: Xiubo Li; +Cc: idryomov, vshankar, ceph-devel
On Sun, 2022-04-24 at 17:39 +0800, Xiubo Li wrote:
> When run out of memories we should redirty the page before failing
> the writepage. Or we will hit BUG_ON(folio_get_private(folio)) in
> ceph_dirty_folio().
>
> URL: https://tracker.ceph.com/issues/55421
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
> 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 261bc8bb2ab8..656bc0ca7a78 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -606,8 +606,10 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
> CEPH_OSD_OP_WRITE, CEPH_OSD_FLAG_WRITE, snapc,
> ceph_wbc.truncate_seq, ceph_wbc.truncate_size,
> true);
> - if (IS_ERR(req))
> + if (IS_ERR(req)) {
> + redirty_page_for_writepage(wbc, page);
> return PTR_ERR(req);
> + }
>
> set_page_writeback(page);
> if (caching)
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-25 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 9:39 [PATCH] ceph: redirty the page for wirtepage if fails Xiubo Li
2022-04-25 19:04 ` Jeff Layton
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.