]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: log meaningful error message when entering damaged state
authorMykola Golub <to.my.trociny@gmail.com>
Sun, 4 May 2025 17:11:54 +0000 (20:11 +0300)
committerMykola Golub <to.my.trociny@gmail.com>
Sun, 11 May 2025 10:53:51 +0000 (13:53 +0300)
due to mds_damage_table_max_entries has been reached.

Fixes: https://tracker.ceph.com/issues/71270
Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
src/mds/DamageTable.cc

index 6b1b97724638943695931b931d1799fe5edeb67a..98cd19148a447f94677c9b7e4c1b5832a3625571 100644 (file)
@@ -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;
   }