summaryrefslogtreecommitdiffstats
path: root/fs/ceph/snap.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-11-15 09:04:37 +0100
committerIlya Dryomov <idryomov@gmail.com>2016-12-12 23:54:27 +0100
commit5f743e4566063c3944c8a2e525ed2fe9d25fc271 (patch)
tree0833d38faed46bfc734ec419aecc0d13a5666866 /fs/ceph/snap.c
parentceph: check availability of mds cluster on mount (diff)
downloadlinux-5f743e4566063c3944c8a2e525ed2fe9d25fc271.tar.xz
linux-5f743e4566063c3944c8a2e525ed2fe9d25fc271.zip
ceph: record truncate size/seq for snap data writeback
Dirty snapshot data needs to be flushed unconditionally. If they were created before truncation, writeback should use old truncate size/seq. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/snap.c')
-rw-r--r--fs/ceph/snap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c
index 9ff5219d849e..8f8b41c2ef0f 100644
--- a/fs/ceph/snap.c
+++ b/fs/ceph/snap.c
@@ -593,6 +593,8 @@ int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
capsnap->atime = inode->i_atime;
capsnap->ctime = inode->i_ctime;
capsnap->time_warp_seq = ci->i_time_warp_seq;
+ capsnap->truncate_size = ci->i_truncate_size;
+ capsnap->truncate_seq = ci->i_truncate_seq;
if (capsnap->dirty_pages) {
dout("finish_cap_snap %p cap_snap %p snapc %p %llu %s s=%llu "
"still has %d dirty pages\n", inode, capsnap,