Skip to content

Commit ce38278

Browse files
authored
Merge pull request ceph#63220 from trociny/wip-71270
mds: log meaningful error message when entering damaged state Reviewed-by: Venky Shankar <[email protected]>
2 parents 3bfb9d6 + 0681310 commit ce38278

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/mds/DamageTable.cc

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,6 @@ bool DamageTable::notify_dentry(
176176
inodeno_t ino, frag_t frag,
177177
snapid_t snap_id, std::string_view dname, std::string_view path)
178178
{
179-
if (oversized()) {
180-
return true;
181-
}
182-
183179
// Special cases: damage to these dirfrags is considered fatal to
184180
// the MDS rank that owns them.
185181
if (
@@ -188,7 +184,14 @@ bool DamageTable::notify_dentry(
188184
(MDS_INO_IS_STRAY(ino) && MDS_INO_STRAY_OWNER(ino) == rank)
189185
) {
190186
derr << "Damage to dentries in fragment " << frag << " of ino " << ino
191-
<< "is fatal because it is a system directory for this rank" << dendl;
187+
<< " is fatal because it is a system directory for this rank" << dendl;
188+
return true;
189+
}
190+
191+
if (oversized()) {
192+
derr << "Damage to dentries in fragment " << frag << " of ino " << ino
193+
<< " is fatal because maximum number of damage table entries "
194+
<< " has been reached" << dendl;
192195
return true;
193196
}
194197

@@ -216,6 +219,9 @@ bool DamageTable::notify_dirfrag(inodeno_t ino, frag_t frag,
216219
}
217220

218221
if (oversized()) {
222+
derr << "Damage to fragment " << frag << " of ino " << ino
223+
<< " is fatal because maximum number of damage table entries"
224+
<< " has been reached" << dendl;
219225
return true;
220226
}
221227

@@ -232,6 +238,9 @@ bool DamageTable::notify_dirfrag(inodeno_t ino, frag_t frag,
232238
bool DamageTable::notify_remote_damaged(inodeno_t ino, std::string_view path)
233239
{
234240
if (oversized()) {
241+
derr << "Damage to remote " << path << " of ino " << ino
242+
<< " is fatal because maximum number of damage table entries"
243+
<< " has been reached" << dendl;
235244
return true;
236245
}
237246

@@ -280,6 +289,9 @@ bool DamageTable::notify_uninline_failed(
280289
std::string_view path)
281290
{
282291
if (oversized()) {
292+
derr << "Uninline failure for " << path << " of ino " << ino
293+
<< " is fatal because maximum number of damage table entries"
294+
<< " has been reached" << dendl;
283295
return true;
284296
}
285297

0 commit comments

Comments
 (0)