Skip to content

Commit

Permalink
Merge pull request ceph#46472 from lxbsz/wip-55331
Browse files Browse the repository at this point in the history
mds: notify the xattr_version to replica MDSes

Reviewed-by: Venky Shankar <[email protected]>
Reviewed-by: Kotresh HR <[email protected]>
Reviewed-by: Jos Collin <[email protected]>
Reviewed-by: Greg Farnum <[email protected]>
  • Loading branch information
vshankar authored Jul 4, 2022
2 parents c37bd10 + 363ee98 commit 988b17c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mds/CInode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2044,24 +2044,28 @@ void CInode::decode_lock_inest(bufferlist::const_iterator& p)

void CInode::encode_lock_ixattr(bufferlist& bl)
{
ENCODE_START(1, 1, bl);
ENCODE_START(2, 1, bl);
encode(get_inode()->version, bl);
encode(get_inode()->ctime, bl);
encode_xattrs(bl);
encode(get_inode()->xattr_version, bl);
ENCODE_FINISH(bl);
}

void CInode::decode_lock_ixattr(bufferlist::const_iterator& p)
{
ceph_assert(!is_auth());
auto _inode = allocate_inode(*get_inode());
DECODE_START(1, p);
DECODE_START(2, p);
decode(_inode->version, p);
utime_t tm;
decode(tm, p);
if (_inode->ctime < tm)
_inode->ctime = tm;
decode_xattrs(p);
if (struct_v >= 2) {
decode(_inode->xattr_version, p);
}
DECODE_FINISH(p);
reset_inode(std::move(_inode));
}
Expand Down

0 comments on commit 988b17c

Please sign in to comment.