From: Mykola Golub Date: Sun, 4 May 2025 17:11:54 +0000 (+0300) Subject: mds: log meaningful error message when entering damaged state X-Git-Tag: testing/wip-vshankar-testing-20250519.052411-debug~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=06813101065e4cac4bc95159e01122e84e52ca72;p=ceph-ci.git mds: log meaningful error message when entering damaged state due to mds_damage_table_max_entries has been reached. Fixes: https://tracker.ceph.com/issues/71270 Signed-off-by: Mykola Golub --- diff --git a/src/mds/DamageTable.cc b/src/mds/DamageTable.cc index 6b1b9772463..98cd19148a4 100644 --- a/src/mds/DamageTable.cc +++ b/src/mds/DamageTable.cc @@ -176,10 +176,6 @@ bool DamageTable::notify_dentry( inodeno_t ino, frag_t frag, snapid_t snap_id, std::string_view dname, std::string_view path) { - if (oversized()) { - return true; - } - // Special cases: damage to these dirfrags is considered fatal to // the MDS rank that owns them. if ( @@ -188,7 +184,14 @@ bool DamageTable::notify_dentry( (MDS_INO_IS_STRAY(ino) && MDS_INO_STRAY_OWNER(ino) == rank) ) { derr << "Damage to dentries in fragment " << frag << " of ino " << ino - << "is fatal because it is a system directory for this rank" << dendl; + << " is fatal because it is a system directory for this rank" << dendl; + return true; + } + + if (oversized()) { + derr << "Damage to dentries in fragment " << frag << " of ino " << ino + << " is fatal because maximum number of damage table entries " + << " has been reached" << dendl; return true; } @@ -216,6 +219,9 @@ bool DamageTable::notify_dirfrag(inodeno_t ino, frag_t frag, } if (oversized()) { + derr << "Damage to fragment " << frag << " of ino " << ino + << " is fatal because maximum number of damage table entries" + << " has been reached" << dendl; return true; } @@ -232,6 +238,9 @@ bool DamageTable::notify_dirfrag(inodeno_t ino, frag_t frag, bool DamageTable::notify_remote_damaged(inodeno_t ino, std::string_view path) { if (oversized()) { + derr << "Damage to remote " << path << " of ino " << ino + << " is fatal because maximum number of damage table entries" + << " has been reached" << dendl; return true; } @@ -280,6 +289,9 @@ bool DamageTable::notify_uninline_failed( std::string_view path) { if (oversized()) { + derr << "Uninline failure for " << path << " of ino " << ino + << " is fatal because maximum number of damage table entries" + << " has been reached" << dendl; return true; }