All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zyan@redhat.com>
To: ceph-devel@vger.kernel.org, jlayton@redhat.com, idryomov@gmail.com
Cc: "Yan, Zheng" <zyan@redhat.com>
Subject: [PATCH 05/13] ceph: remove stale check in ceph_invalidatepage()
Date: Mon,  4 Sep 2017 17:39:00 +0800	[thread overview]
Message-ID: <20170904093908.57316-6-zyan@redhat.com> (raw)
In-Reply-To: <20170904093908.57316-1-zyan@redhat.com>

both set_page_dirty and truncate_complete_page should be called
for locked page. they can't race with each other.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
---
 fs/ceph/addr.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index d82036e19083..b6ac3da9ddab 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -152,17 +152,10 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset,
 
 	ceph_invalidate_fscache_page(inode, page);
 
+	WARN_ON(!PageLocked(page));
 	if (!PagePrivate(page))
 		return;
 
-	/*
-	 * We can get non-dirty pages here due to races between
-	 * set_page_dirty and truncate_complete_page; just spit out a
-	 * warning, in case we end up with accounting problems later.
-	 */
-	if (!PageDirty(page))
-		pr_err("%p invalidatepage %p page not dirty\n", inode, page);
-
 	ClearPageChecked(page);
 
 	dout("%p invalidatepage %p idx %lu full dirty page\n",
-- 
2.13.5


  parent reply	other threads:[~2017-09-04  9:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04  9:38 [PATCH 00/13] ceph: snapshot and multimds fixes Yan, Zheng
2017-09-04  9:38 ` [PATCH 01/13] ceph: fix null pointer dereference in ceph_flush_snaps() Yan, Zheng
2017-09-04  9:38 ` [PATCH 02/13] ceph: fix message order check in handle_cap_export() Yan, Zheng
2017-09-04  9:38 ` [PATCH 03/13] ceph: handle race between vmtruncate and queuing cap snap Yan, Zheng
2017-09-04  9:38 ` [PATCH 04/13] ceph: queue cap snap only when snap realm's context changes Yan, Zheng
2017-09-04  9:39 ` Yan, Zheng [this message]
2017-09-04  9:39 ` [PATCH 06/13] ceph: properly get capsnap's size in get_oldest_context() Yan, Zheng
2017-09-04  9:39 ` [PATCH 07/13] ceph: make writepage_nounlock() invalidate page that beyonds EOF Yan, Zheng
2017-09-04  9:39 ` [PATCH 08/13] ceph: optimize pagevec iterating in ceph_writepages_start() Yan, Zheng
2017-09-04  9:39 ` [PATCH 09/13] ceph: cleanup local varibles " Yan, Zheng
2017-09-04  9:39 ` [PATCH 10/13] ceph: fix "range cyclic" mode writepages Yan, Zheng
2017-09-04  9:39 ` [PATCH 11/13] ceph: ignore wbc->range_{start,end} when write back snapshot data Yan, Zheng
2017-09-04  9:39 ` [PATCH 12/13] ceph: fix capsnap dirty pages accounting Yan, Zheng
2017-09-04  9:39 ` [PATCH 13/13] ceph: wait on writeback after writing snapshot data Yan, Zheng

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=20170904093908.57316-6-zyan@redhat.com \
    --to=zyan@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@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.