]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/journal: make used_preallocated_ino crash more graceful 53080/head
authorDhairya Parmar <dparmar@redhat.com>
Tue, 22 Aug 2023 10:22:42 +0000 (15:52 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Mon, 20 Nov 2023 10:41:30 +0000 (16:11 +0530)
failure while removing used_preallocated_ino from session's prealloc_inos
set leads to backtrace pointing to interval_set:

interval_set<inodeno_t, std::map>::erase(inodeno_t, inodeno_t, std::function<bool (inodeno_t, inodeno_t)>)
EMetaBlob::replay(MDSRank*, LogSegment*, MDPeerUpdate*)
EUpdate::replay(MDSRank*)
MDLog::_replay_thread()
MDLog::ReplayThread::entry()

which is cumbersome to debug, while the actual root cause is still a WIP, make the crash more graceful
so that it helps while debugging.

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/mds/journal.cc

index f9eb8a1eecf2260983483eb2615cd3be1587d5c7..e080b1176105072b1f0c7b6ed8452e10a0b0a6b5 100644 (file)
@@ -1620,8 +1620,9 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, int type, MDPeerUpdate
        if (used_preallocated_ino) {
          if (!session->info.prealloc_inos.empty()) {
            inodeno_t ino = session->take_ino(used_preallocated_ino);
-           session->info.prealloc_inos.erase(ino);
+            dout(5) "received ino " << ino << " from the session" << dendl;
            ceph_assert(ino == used_preallocated_ino);
+           session->info.prealloc_inos.erase(ino);
          }
           mds->sessionmap.replay_dirty_session(session);
        }