Skip to content

Commit 7e1ee54

Browse files
ukernelidryomov
authored andcommitted
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" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 2a2d927 commit 7e1ee54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ceph/addr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,8 @@ static int ceph_writepages_start(struct address_space *mapping,
930930

931931
/* only if matching snap context */
932932
pgsnapc = page_snap_context(page);
933-
if (pgsnapc->seq > snapc->seq) {
934-
dout("page snapc %p %lld > oldest %p %lld\n",
933+
if (pgsnapc != snapc) {
934+
dout("page snapc %p %lld != oldest %p %lld\n",
935935
pgsnapc, pgsnapc->seq, snapc, snapc->seq);
936936
unlock_page(page);
937937
continue;

0 commit comments

Comments
 (0)