Skip to content

Commit 693f058

Browse files
committed
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 <[email protected]>
1 parent 7b2d9c4 commit 693f058

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mds/CDir.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,6 +2400,8 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
24002400
CDentry::linkage_t *dnl = dn->get_linkage();
24012401
if (dnl->is_primary() && dnl->get_inode()->state_test(CInode::STATE_REJOINUNDEF))
24022402
undef_inodes.push_back(dnl->get_inode());
2403+
if (dnl->is_referent_remote() && dnl->get_referent_inode()->state_test(CInode::STATE_REJOINUNDEF))
2404+
undef_inodes.push_back(dnl->get_referent_inode());
24032405
}
24042406

24052407
if (complete) {

0 commit comments

Comments
 (0)