Fix incorrect clearing of LOC_CORRUPTED on the second scrub

This commit is contained in:
Vitaliy Filippov
2026-06-13 19:56:06 +03:00
parent 213f76c66c
commit 1834743a0e
+6 -3
View File
@@ -622,10 +622,13 @@ void osd_t::scrub_check_results(osd_op_t *cur_op)
continue;
}
auto & chunk = new_set[set_pos];
if (op_data->stripes[i].read_error && chunk.loc_bad != LOC_CORRUPTED)
if (op_data->stripes[i].read_error)
{
changes++;
chunk.loc_bad = LOC_CORRUPTED;
if (!(chunk.loc_bad & LOC_CORRUPTED))
{
changes++;
chunk.loc_bad = LOC_CORRUPTED;
}
}
else if (op_data->stripes[i].read_end > 0 && !op_data->stripes[chunk.role].missing &&
(chunk.loc_bad & LOC_CORRUPTED))