Skip to content

Commit c656228

Browse files
Merge pull request ceph#55365 from kotreshhr/ceph-mds-replica-debug-logs
mds: Add debug messages in replica handling Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Dhairya Parmar <[email protected]> Reviewed-by: Rishabh Dave <[email protected]> Reviewed-by: Jos Collin <[email protected]>
2 parents fadd786 + d79f300 commit c656228

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/mds/MDCache.cc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11139,12 +11139,16 @@ void MDCache::send_dentry_link(CDentry *dn, const MDRequestRef& mdr)
1113911139
CDir *subtree = get_subtree_root(dn->get_dir());
1114011140
for (const auto &p : dn->get_replicas()) {
1114111141
// don't tell (rename) witnesses; they already know
11142-
if (mdr.get() && mdr->more()->witnessed.count(p.first))
11142+
if (mdr.get() && mdr->more()->witnessed.count(p.first)) {
11143+
dout(20) << __func__ << " witnesses already know, skip notifying replica for the dentry " << *dn << dendl;
1114311144
continue;
11145+
}
1114411146
if (mds->mdsmap->get_state(p.first) < MDSMap::STATE_REJOIN ||
1114511147
(mds->mdsmap->get_state(p.first) == MDSMap::STATE_REJOIN &&
11146-
rejoin_gather.count(p.first)))
11148+
rejoin_gather.count(p.first))) {
11149+
dout(20) << __func__ << " mds is not ready, skip notifying replica for the dentry " << *dn << dendl;
1114711150
continue;
11151+
}
1114811152
CDentry::linkage_t *dnl = dn->get_linkage();
1114911153
auto m = make_message<MDentryLink>(subtree->dirfrag(), dn->get_dir()->dirfrag(), dn->get_name(), dnl->is_primary());
1115011154
if (dnl->is_primary()) {
@@ -11218,13 +11222,17 @@ void MDCache::send_dentry_unlink(CDentry *dn, CDentry *straydn, const MDRequestR
1121811222
it != replicas.end();
1121911223
++it) {
1122011224
// don't tell (rmdir) witnesses; they already know
11221-
if (mdr.get() && mdr->more()->witnessed.count(*it))
11225+
if (mdr.get() && mdr->more()->witnessed.count(*it)) {
11226+
dout(20) << __func__ << " witnesses already know, skip notifying replica for the dentry " << *dn << dendl;
1122211227
continue;
11228+
}
1122311229

1122411230
if (mds->mdsmap->get_state(*it) < MDSMap::STATE_REJOIN ||
1122511231
(mds->mdsmap->get_state(*it) == MDSMap::STATE_REJOIN &&
11226-
rejoin_gather.count(*it)))
11232+
rejoin_gather.count(*it))) {
11233+
dout(20) << __func__ << " mds is not ready, skip notifying replica for the dentry " << *dn << dendl;
1122711234
continue;
11235+
}
1122811236

1122911237
auto unlink = make_message<MDentryUnlink>(dn->get_dir()->dirfrag(), dn->get_name());
1123011238
if (straydn) {

0 commit comments

Comments
 (0)