diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-11-15 11:04:37 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-12-13 01:54:27 +0300 |
commit | 5f743e4566063c3944c8a2e525ed2fe9d25fc271 (patch) | |
tree | 0833d38faed46bfc734ec419aecc0d13a5666866 /fs/ceph/snap.c | |
parent | e9e427f0a14f7e4773896dd7af357819a56d097a (diff) | |
download | linux-5f743e4566063c3944c8a2e525ed2fe9d25fc271.tar.xz |
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.c | 2 |
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, |