{
dout(15) << "request_cleanup " << *mdr << dendl;
+ if (mdr->killed && mdr->client_request && mdr->is_batch_head()) {
+ dout(10) << "request " << *mdr << " was killed and dead" << dendl;
+ //if the mdr is a "batch_op" and it has followers, pick a follower as
+ //the new "head of the batch ops" and go on processing the new one.
+ int mask = mdr->client_request->head.args.getattr.mask;
+ auto it = mdr->batch_op_map->find(mask);
+ auto new_batch_head = it->second->find_new_head();
+ if (!new_batch_head) {
+ mdr->batch_op_map->erase(it);
+ }
+ mds->finisher->queue(new C_MDS_RetryRequest(this, new_batch_head));
+ }
+
if (mdr->has_more()) {
if (mdr->more()->is_ambiguous_auth)
mdr->clear_ambiguous_auth();
ceph_assert(!mdr->has_more() || mdr->more()->waiting_on_peer.empty());
if (mdr->killed) {
- dout(10) << "request " << *mdr << " was killed" << dendl;
- //if the mdr is a "batch_op" and it has followers, pick a follower as
- //the new "head of the batch ops" and go on processing the new one.
- if (mdr->is_batch_head()) {
- int mask = mdr->client_request->head.args.getattr.mask;
- auto it = mdr->batch_op_map->find(mask);
- auto new_batch_head = it->second->find_new_head();
- if (!new_batch_head) {
- mdr->batch_op_map->erase(it);
- return;
- }
- mdr = std::move(new_batch_head);
- } else {
- return;
- }
+ // Should already be reset in request_cleanup().
+ ceph_assert(!mdr->is_batch_head());
+ return;
} else if (mdr->aborted) {
mdr->aborted = false;
mdcache->request_kill(mdr);