diff options
author | Yan, Zheng <zyan@redhat.com> | 2018-03-04 11:36:01 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-04-02 11:12:47 +0300 |
commit | af9cc401ce7452f9d965ba4553d8ffe7f0ed42ee (patch) | |
tree | b6597549d5f0981b091f66b5afa9e3fc0daf58c5 /fs/ceph/inode.c | |
parent | bc4b5ad3a6a1cfe11494380affc4bfc4521af499 (diff) | |
download | linux-af9cc401ce7452f9d965ba4553d8ffe7f0ed42ee.tar.xz |
ceph: invalidate pages that beyond EOF in ceph_writepages_start()
Dirty pages can be associated with different capsnap. Different capsnap
may have different EOF value. So invalidating dirty pages according to
the largest EOF value is wrong. Dirty pages beyond EOF, but associated
with other capsnap, do not get invalidated.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index c6ec5aa46100..be5f12d0d637 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1867,20 +1867,9 @@ retry: * possibly truncate them.. so write AND block! */ if (ci->i_wrbuffer_ref_head < ci->i_wrbuffer_ref) { - struct ceph_cap_snap *capsnap; - to = ci->i_truncate_size; - list_for_each_entry(capsnap, &ci->i_cap_snaps, ci_item) { - // MDS should have revoked Frw caps - WARN_ON_ONCE(capsnap->writing); - if (capsnap->dirty_pages && capsnap->size > to) - to = capsnap->size; - } spin_unlock(&ci->i_ceph_lock); dout("__do_pending_vmtruncate %p flushing snaps first\n", inode); - - truncate_pagecache(inode, to); - filemap_write_and_wait_range(&inode->i_data, 0, inode->i_sb->s_maxbytes); goto retry; |