All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: "Yan, Zheng" <zyan@redhat.com>, ceph-devel@vger.kernel.org
Cc: dan.carpenter@oracle.com
Subject: Re: [PATCH 2/3] ceph: redirty page when writepage_nounlock() skips unwritable page
Date: Tue, 23 May 2017 06:33:06 -0400	[thread overview]
Message-ID: <1495535586.2946.1.camel@redhat.com> (raw)
In-Reply-To: <20170523095439.63347-2-zyan@redhat.com>

On Tue, 2017-05-23 at 17:54 +0800, Yan, Zheng wrote:
> Ceph needs to flush dirty page in the order in which in which snap
> context they belong to. Dirty pages belong to older snap context
> should be flushed earlier. writepage_nounlock() can not flush a
> page, it should redirty the page.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
> ---
>  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 ff25239..1880125 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -551,8 +551,9 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
>  		dout("writepage %p page %p snapc %p not writeable - noop\n",
>  		     inode, page, snapc);
>  		/* we should only noop if called by kswapd */
> -		WARN_ON((current->flags & PF_MEMALLOC) == 0);
> +		WARN_ON(!(current->flags & PF_MEMALLOC));
>  		ceph_put_snap_context(oldest);
> +		redirty_page_for_writepage(wbc, page);
>  		goto out;
>  	}
>  	ceph_put_snap_context(oldest);

Reviewed-by: Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2017-05-23 10:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23  9:54 [PATCH 1/3] ceph: remove useless page->mapping check in writepage_nounlock() Yan, Zheng
2017-05-23  9:54 ` [PATCH 2/3] ceph: redirty page when writepage_nounlock() skips unwritable page Yan, Zheng
2017-05-23 10:33   ` Jeff Layton [this message]
2017-05-23  9:54 ` [PATCH 3/3] ceph: cleanup writepage_nounlock() Yan, Zheng
2017-05-23 10:36   ` Jeff Layton
2017-05-23 10:31 ` [PATCH 1/3] ceph: remove useless page->mapping check in writepage_nounlock() Jeff Layton

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=1495535586.2946.1.camel@redhat.com \
    --to=jlayton@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=zyan@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 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.