]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: Fix mdcache rejoin invented referent inode
authorKotresh HR <khiremat@redhat.com>
Wed, 5 Mar 2025 11:07:51 +0000 (16:37 +0530)
committerKotresh HR <khiremat@redhat.com>
Wed, 5 Mar 2025 11:32:31 +0000 (17:02 +0530)
commit693f058426a4695348482cb07a1f763abe6e6543
tree4144ddef260ca052faa5d0c45ed62dd1a6f4b2f4
parent7b2d9c4b580b89abdcdd4832391f91bcddae8b28
mds: Fix mdcache rejoin invented referent inode

During mds cache rejoin, the referent inode could
be invented and marked CInode::STATE_REJOINUNDEF.
The same inode is fetched from the disk later and
the state should be cleared. This was missing for
the referent inode and hence was causing the following
crash.

src/mds/StrayManager.cc: 453: FAILED ceph_assert(!in->state_test(CInode::STATE_REJOINUNDEF))

 ceph version Development (no_version) tentacle (dev)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x11f) [0x7f3a9880bc58]
 2: (ceph::register_assert_context(ceph::common::CephContext*)+0) [0x7f3a9880be7a]
 3: (StrayManager::_eval_stray(CDentry*)+0x329) [0x56300f4aa5f7]
 4: (StrayManager::eval_stray(CDentry*)+0x1c) [0x56300f4ab0e4]
 5: (MDCache::notify_stray(CDentry*)+0x48) [0x56300f3b6d46]
 6: (Server::_link_remote_finish(boost::intrusive_ptr<MDRequestImpl> ...
 7: (C_MDS_link_remote_finish::finish(int)+0x2e) [0x56300f3e59ee]
 8: (Context::complete(int)+0x9) [0x56300f2b688f]
 9: (MDSContext::complete(int)+0x61) [0x56300f5d3fb1]
 10: (MDSIOContextBase::complete(int)+0x2c4) [0x56300f5d43bc]
 11: (MDSLogContextBase::complete(int)+0x32) [0x56300f5d44d0]
 12: (Finisher::finisher_thread_entry()+0x22c) [0x7f3a987bb878]
 13: (Finisher::FinisherThread::entry()+0xd) [0x7f3a987bc157]
 14: (Thread::entry_wrapper()+0x2f) [0x7f3a987eb4fd]
 15: (Thread::_entry_func(void*)+0x9) [0x7f3a987eb50f]
 16: /lib64/libc.so.6(+0x98088) [0x7f3a974a6088]
 17: /lib64/libc.so.6(+0x11bf8c) [0x7f3a97529f8c]

Fixes: https://tracker.ceph.com/issues/54205
Signed-off-by: Kotresh HR <khiremat@redhat.com>
src/mds/CDir.cc