memset(&empty, 0, sizeof(empty));
statq.push_back(empty);
+ hash_map<inodeno_t, int> nlink;
+ hash_map<inodeno_t, int> nlink_seen;
+
while (!dirq.empty()) {
string dir = dirq.front();
frag_info_t expect = statq.front();
continue;
}
+ nlink_seen[st.st_ino]++;
+ nlink[st.st_ino] = st.st_nlink;
+
if (S_ISDIR(st.st_mode))
actual.nsubdirs++;
else
}
}
+ for (hash_map<inodeno_t,int>::iterator p = nlink.begin(); p != nlink.end(); p++) {
+ if (nlink_seen[p->first] != p->second)
+ dout(0) << p->first << " nlink " << p->second << " != " << nlink_seen[p->first] << "seen" << dendl;
+ }
+
return 0;
}
}
}
// [resolving]
- if (uncommitted_slave_updates.count(who)) {
+ if (uncommitted_slave_updates.count(who) &&
+ !uncommitted_slave_updates[who].empty()) {
for (map<metareqid_t, MDSlaveUpdate*>::iterator p = uncommitted_slave_updates[who].begin();
p != uncommitted_slave_updates[who].end();
++p) {
dout(10) << " including uncommitted " << p->first << dendl;
m->add_slave_request(p->first);
}
+ dout(10) << " will need resolve ack from mds" << who << dendl;
need_resolve_ack.insert(who);
}
// ambiguous slave requests?
if (!m->slave_requests.empty()) {
MMDSResolveAck *ack = new MMDSResolveAck;
-
for (list<metareqid_t>::iterator p = m->slave_requests.begin();
p != m->slave_requests.end();
++p) {
ack->add_abort(*p);
}
}
-
mds->send_message_mds(ack, from);
}