ceph: fix "range cyclic" mode writepages
authorYan, Zheng <zyan@redhat.com>
Sat, 2 Sep 2017 16:04:31 +0000 (00:04 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 6 Sep 2017 17:56:57 +0000 (19:56 +0200)
commit590e9d9861f5f21fbbb0266e40e6a17bc5084dd0
tree57665da237483343bc23163aedfc23123e3820e0
parent0e5ecac7168366500af1fa9a70fa9ce573f891f3
ceph: fix "range cyclic" mode writepages

In range cyclic mode, writepages() should first write dirty pages
in range [writeback_index, (pgoff_t)-1], then write pages in range
[0, writeback_index -1]. Besides, if writepages() encounters a page
that beyond EOF, it should restart from the beginning.

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