]> 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 <mykola.golub@clyso.com>
Fri, 6 Jun 2025 16:47:58 +0000 (19:47 +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>
(cherry picked from commit 06813101065e4cac4bc95159e01122e84e52ca72)

Conflicts:
src/mds/DamageTable.cc (no "uninline failures" in squid)

src/mds/DamageTable.cc

index 2079d23333a835915d355a00953594549f4a9b44..77e6c7078930e4490b9ed3237ef66d5195a86a6b 100644 (file)
@@ -132,10 +132,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 (
@@ -144,7 +140,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;
   }
 
@@ -172,6 +175,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;
   }
 
@@ -188,6 +194,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;
   }