summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-09-03 04:09:11 +0200
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 19:56:59 +0200
commit7e1ee54a07b6f00f4b6dd9cd24505d3b76774ddc (patch)
tree2e1f67a3bac4941bb55f67e31a3454647132c91f /fs
parentceph: ignore wbc->range_{start,end} when write back snapshot data (diff)
downloadlinux-7e1ee54a07b6f00f4b6dd9cd24505d3b76774ddc.tar.xz
linux-7e1ee54a07b6f00f4b6dd9cd24505d3b76774ddc.zip
ceph: fix capsnap dirty pages accounting
writepages_finish() calls ceph_put_wrbuffer_cap_refs() once for all pages, parameter snapc is set to req->r_snapc. So writepages() shouldn't write dirty pages associated with different snapc in one OSD request. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/addr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 201e529e8a6c..1ffdb903eb79 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -930,8 +930,8 @@ get_more_pages:
/* only if matching snap context */
pgsnapc = page_snap_context(page);
- if (pgsnapc->seq > snapc->seq) {
- dout("page snapc %p %lld > oldest %p %lld\n",
+ if (pgsnapc != snapc) {
+ dout("page snapc %p %lld != oldest %p %lld\n",
pgsnapc, pgsnapc->seq, snapc, snapc->seq);
unlock_page(page);
continue;