Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

CORTX-33577: fix panic in degraded mode read #1970

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions motr/io_nw_xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,11 +1925,17 @@ static int nw_xfer_req_dispatch(struct nw_xfer_request *xfer)
* In 'parity verify' mode, a whole parity group, including
* data and parity units are all read from ioservices.
* If some units failed to read, no need to read extra unit.
* The units needed for recvoery are ready.
* The units needed for recovery are ready.
*/
M0_ASSERT(ioreq_sm_state(ioo) == IRS_DEGRADED_READING);
M0_ASSERT(op->op_code == M0_OC_READ &&
instance->m0c_config->mc_is_read_verify);
if (op->op_code == M0_OC_READ &&
instance->m0c_config->mc_is_read_verify) {
M0_LOG(M0_DEBUG, "As per design in Read verify mode");
} else {
M0_LOG(M0_ERROR, "More than K targets are offline");
rc = -EIO;
}

ioreq_sm_state_set_locked(ioo, IRS_READ_COMPLETE);
} else if (rc == 0)
xfer->nxr_state = NXS_INFLIGHT;
Expand Down