ceph: wait on writeback after writing snapshot data
authorYan, Zheng <zyan@redhat.com>
Fri, 1 Sep 2017 09:03:16 +0000 (17:03 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 6 Sep 2017 17:57:00 +0000 (19:57 +0200)
commitf275635ee0b6641151dfaf07b901d7c8d4d8e987
treeefd8a52829dc0727823a765d78c9ae86fa5a73bd
parent7e1ee54a07b6f00f4b6dd9cd24505d3b76774ddc
ceph: wait on writeback after writing snapshot data

In sync mode, writepages() needs to write all dirty pages. But
it can only write dirty pages associated with the oldest snapc.
To write dirty pages associated with next snapc, it needs to wait
until current writes complete.

Without this wait, writepages() keeps looking up dirty pages, but
the found dirty pages are not writeable. It wastes CPU time.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c