mirror of
https://github.com/ceph/ceph
synced 2025-01-11 13:41:02 +00:00
Merge pull request #9323 from ukernel/wip-mdsmap-subs
MDSMonitor.cc: fix mdsmap.<namespace> subscriptions Reviewed-by: John Spray <john.spray@redhat.com>
This commit is contained in:
commit
4e76c8fe44
@ -2411,22 +2411,22 @@ void MDSMonitor::check_subs()
|
||||
{
|
||||
std::list<std::string> types;
|
||||
|
||||
// Subscriptions may be to "fsmap" (MDS and legacy clients),
|
||||
// "fsmap.<namespace>", or to "fsmap" for the full state of all
|
||||
// Subscriptions may be to "mdsmap" (MDS and legacy clients),
|
||||
// "mdsmap.<namespace>", or to "fsmap" for the full state of all
|
||||
// filesystems. Build a list of all the types we service
|
||||
// subscriptions for.
|
||||
types.push_back("mdsmap");
|
||||
types.push_back("fsmap");
|
||||
types.push_back("mdsmap");
|
||||
for (const auto &i : fsmap.filesystems) {
|
||||
auto fscid = i.first;
|
||||
std::ostringstream oss;
|
||||
oss << "fsmap." << fscid;
|
||||
oss << "mdsmap." << fscid;
|
||||
types.push_back(oss.str());
|
||||
}
|
||||
|
||||
for (const auto &type : types) {
|
||||
if (mon->session_map.subs.count(type) == 0)
|
||||
return;
|
||||
continue;
|
||||
xlist<Subscription*>::iterator p = mon->session_map.subs[type]->begin();
|
||||
while (!p.end()) {
|
||||
Subscription *sub = *p;
|
||||
|
Loading…
Reference in New Issue
Block a user