mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neilb@suse.de>, Xiubo Li <xiubli@redhat.com>,
	Ilya Dryomov <idryomov@gmail.com>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE
Date: Sun, 24 Mar 2024 19:45:21 -0400	[thread overview]
Message-ID: <14fd6b28596fb9137ef2d66910726951948c3c53.camel@kernel.org> (raw)
In-Reply-To: <171131888022.13576.8585118457506044105@noble.neil.brown.name>

On Mon, 2024-03-25 at 09:21 +1100, NeilBrown wrote:
> 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);
>  

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2024-03-24 23:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24 22:21 NeilBrown
2024-03-24 23:45 ` Jeff Layton [this message]
2024-03-25  1:28 ` Xiubo Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14fd6b28596fb9137ef2d66910726951948c3c53.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=xiubli@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®