Consider:
- send discover on frag X
- X refragments
- we take the waiter and rediscover on frag Y
- we get the reply for the X discover
The auth mds will correctly delay sending the reply until the refragment
completes and it unfreezes, but the reply was getting the original frag_t,
not the new one.
Signed-off-by: Sage Weil <sage@newdream.net>
// add dir
if (reply->is_empty() && !dis->wants_base_dir()) {
dout(7) << "handle_discover not adding unwanted base dir " << *curdir << dendl;
+ // make sure the base frag is correct, though, in there was a refragment since the
+ // original request was sent.
+ reply->set_base_dir_frag(curdir->get_frag());
} else {
assert(!curdir->is_ambiguous_auth()); // would be frozen.
if (!reply->trace.length())
bool is_unsolicited() { return unsolicited; }
void mark_unsolicited() { unsolicited = true; }
+ void set_base_dir_frag(frag_t df) { base_dir_frag = df; }
+
// cons
MDiscoverReply() {}
MDiscoverReply(MDiscover *dis) :