mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: NeilBrown <neilb@suse.de>, Ilya Dryomov <idryomov@gmail.com>,
	Jeff Layton <jlayton@kernel.org>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE
Date: Mon, 25 Mar 2024 09:28:39 +0800	[thread overview]
Message-ID: <88f42e4c-4046-4d8d-a7aa-3aad66f38cba@redhat.com> (raw)
In-Reply-To: <171131888022.13576.8585118457506044105@noble.neil.brown.name>


On 3/25/24 06:21, 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);
>   

Good catch!

Applied to the testing branch to run the tests.

Thanks NeilBrown

- Xiubo


      parent reply	other threads:[~2024-03-25  1:28 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
2024-03-25  1:28 ` Xiubo Li [this message]

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=88f42e4c-4046-4d8d-a7aa-3aad66f38cba@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    /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®