From: shenhang Date: Mon, 16 Sep 2019 11:21:04 +0000 (+0800) Subject: client: add warning when cap != in->auth_cap. X-Git-Tag: v15.1.0~1077^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=387686c560c6266904172732740c62db7582e4ef;p=ceph.git client: add warning when cap != in->auth_cap. Fixes: https://tracker.ceph.com/issues/41799 Signed-off-by: Shen Hang --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 23806511ddd..8a88269278a 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -4034,7 +4034,9 @@ void Client::add_update_cap(Inode *in, MetaSession *mds_session, uint64_t cap_id * don't remove caps. */ if (ceph_seq_cmp(seq, cap.seq) <= 0) { - ceph_assert(&cap == in->auth_cap); + if (&cap != in->auth_cap) + ldout(cct, 0) << "WARNING: " << "inode " << *in << " caps on mds." << mds << " != auth_cap." << dendl; + ceph_assert(cap.cap_id == cap_id); seq = cap.seq; mseq = cap.mseq;