- /*
- * This is recovery case. Adjust super range if input range looks like
- * it is allocated from new super.
- */
- if (in != NULL) {
- CDEBUG(D_INFO, "%s: Input seq range: "
- DRANGE"\n", seq->lss_name, PRANGE(in));
-
- if (range_is_exhausted(space)) {
- /*
- * Server cannot send empty range to client, this is why
- * we check here that range from client is "newer" than
- * exhausted super.
- */
- LASSERT(in->lr_end > space->lr_start);
-
- /*
- * Start is set to end of last allocated, because it
- * *is* already allocated so we take that into account
- * and do not use for other allocations.
- */
- space->lr_start = in->lr_end;
-
- /*
- * End is set to in->lr_start + super sequence
- * allocation unit. That is because in->lr_start is
- * first seq in new allocated range from controller
- * before failure.
- */
- space->lr_end = in->lr_start + LUSTRE_SEQ_SUPER_WIDTH;
-
- if (!seq->lss_cli) {
- CERROR("%s: No sequence controller "
- "is attached.\n", seq->lss_name);
- RETURN(-ENODEV);
- }
-
- /*
- * Let controller know that this is recovery and last
- * obtained range from it was @space.
- */
- rc = seq_client_replay_super(seq->lss_cli, space, env);
- if (rc) {
- CERROR("%s: Can't replay super-sequence, "
- "rc %d\n", seq->lss_name, rc);
- RETURN(rc);
- }
- } else {
- /*
- * Update super start by end from client's range. Super
- * end should not be changed if range was not exhausted.
- */
- if (in->lr_end > space->lr_start)
- space->lr_start = in->lr_end;
- }