Skip to content

Commit 09fb085

Browse files
committed
Merge PR ceph#52173 into main
* refs/pull/52173/head: mds: MDLog::_recovery_thread: handle the errors gracefully Reviewed-by: Kotresh Hiremath Ravishankar <[email protected]> Reviewed-by: Xiubo Li <[email protected]> Reviewed-by: Venky Shankar <[email protected]>
2 parents 82ddbb6 + d562905 commit 09fb085

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/mds/MDLog.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,14 @@ void MDLog::_recovery_thread(MDSContext *completion)
977977
inodeno_t const default_log_ino = MDS_INO_LOG_OFFSET + mds->get_nodeid();
978978
jp.front = default_log_ino;
979979
int write_result = jp.save(mds->objecter);
980-
// Nothing graceful we can do for this
981-
ceph_assert(write_result >= 0);
980+
if (write_result < 0) {
981+
std::lock_guard l(mds->mds_lock);
982+
if (mds->is_daemon_stopping()) {
983+
return;
984+
}
985+
mds->damaged();
986+
ceph_abort(); // damaged should never return
987+
}
982988
} else if (read_result == -CEPHFS_EBLOCKLISTED) {
983989
derr << "Blocklisted during JournalPointer read! Respawning..." << dendl;
984990
mds->respawn();

0 commit comments

Comments
 (0)