mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Li Wang <liwang@ubuntukylin.com>
To: ceph-devel@vger.kernel.org
Cc: linux-cachefs@redhat.com, Sage Weil <sage@inktank.com>,
	linux-kernel@vger.kernel.org, Li Wang <liwang@ubuntukylin.com>,
	Min Chen <minchen@ubuntukylin.com>,
	Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Subject: [PATCH] ceph: Update the pages in fscache in writepages() path
Date: Fri,  1 Nov 2013 11:56:48 +0800	[thread overview]
Message-ID: <1383278208-4053-1-git-send-email-liwang@ubuntukylin.com> (raw)

Currently, the pages in fscache only are updated in writepage() path,
add the process in writepages().

Signed-off-by: Min Chen <minchen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
---
 fs/ceph/addr.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 6df8bd4..cc57911 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -746,7 +746,7 @@ retry:
 
 	while (!done && index <= end) {
 		int num_ops = do_sync ? 2 : 1;
-		unsigned i;
+		unsigned i, j;
 		int first;
 		pgoff_t next;
 		int pvec_pages, locked_pages;
@@ -894,7 +894,6 @@ get_more_pages:
 		if (!locked_pages)
 			goto release_pvec_pages;
 		if (i) {
-			int j;
 			BUG_ON(!locked_pages || first < 0);
 
 			if (pvec_pages && i == pvec_pages &&
@@ -924,7 +923,10 @@ get_more_pages:
 
 		osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0,
 							!!pool, false);
-
+		for(j = 0; j < locked_pages; j++) {
+			struct page *page = pages[j];
+			ceph_readpage_to_fscache(inode, page);
+		}		
 		pages = NULL;	/* request message now owns the pages array */
 		pool = NULL;
 
-- 
1.7.9.5


             reply	other threads:[~2013-11-01  4:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01  3:56 Li Wang [this message]
2013-11-05 17:30 ` Milosz Tanski
2013-11-05 23:56   ` Sage Weil
2013-11-06 13:41     ` Milosz Tanski
2013-11-06 15:01       ` Yan, Zheng
2013-11-19 16:05         ` Milosz Tanski
2013-11-20  1:18           ` Yan, Zheng
2013-11-20  2:30             ` Milosz Tanski
     [not found]     ` <CANP1eJHETFZ+oBoz+XP4hnOc20UNECNoW5jfY-C-6q8Z7ExgEg@mail.gmail.com>
     [not found]       ` <alpine.DEB.2.00.1311060731430.7684@cobra.newdream.net>
2013-11-06 16:38         ` Milosz Tanski

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=1383278208-4053-1-git-send-email-liwang@ubuntukylin.com \
    --to=liwang@ubuntukylin.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchen@ubuntukylin.com \
    --cc=sage@inktank.com \
    --cc=yunchuanwen@ubuntukylin.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®