From: Jeff Layton Date: Tue, 10 Aug 2021 14:51:34 +0000 (-0400) Subject: mds: ensure that we send the btime in cap messages X-Git-Tag: v17.1.0~874^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c33a590466f7c553ea6bc62e90dc67728fa1e26;p=ceph.git mds: ensure that we send the btime in cap messages While troubleshooting a different problem, I noticed that the kclient would occasionally not report the btime in statx calls. It's most evident in the case where two different clients are alternately writing to the same file, and another task on one of them is repeatedly issuing statx() calls against it. The problem is that we're not correctly populating the MClientCaps btime field when issuing caps, and that causes the MDS to incorrectly send a zeroed-out btime field. Fixes: https://tracker.ceph.com/issues/52123 Signed-off-by: Jeff Layton --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index b7b78e64824..29519894249 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -4133,6 +4133,7 @@ void CInode::encode_cap_message(const ref_t &m, Capability *cap) m->mtime = i->mtime; m->atime = i->atime; m->ctime = i->ctime; + m->btime = i->btime; m->change_attr = i->change_attr; m->time_warp_seq = i->time_warp_seq; m->nfiles = i->dirstat.nfiles;