Signed-off-by: Yunchuan Wen <[email protected]>
Signed-off-by: Li Wang <[email protected]>
---
src/mds/Locker.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index 63e0e08..4b02a56 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -2691,6 +2691,7 @@ void Locker::_update_cap_fields(CInode *in, int dirty,
MClientCaps *m, inode_t *
utime_t mtime = m->get_mtime();
utime_t ctime = m->get_ctime();
uint64_t size = m->get_size();
+ uint64_t inline_version = m->inline_version;
if (((dirty & CEPH_CAP_FILE_WR) && mtime > pi->mtime) ||
((dirty & CEPH_CAP_FILE_EXCL) && mtime != pi->mtime)) {
@@ -2710,6 +2711,12 @@ void Locker::_update_cap_fields(CInode *in, int dirty,
MClientCaps *m, inode_t *
pi->size = size;
pi->rstat.rbytes = size;
}
+ if (in->inode.is_file() &&
+ (dirty & CEPH_CAP_FILE_WR) &&
+ inline_version > pi->inline_version) {
+ pi->inline_version = inline_version;
+ pi->inline_data = m->inline_data;
+ }
if ((dirty & CEPH_CAP_FILE_EXCL) && atime != pi->atime) {
dout(7) << " atime " << pi->atime << " -> " << atime
<< " for " << *in << dendl;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html