Changeset f81960c5 in mainline
- Timestamp:
- 2024-11-22T21:23:38Z (7 months ago)
- Children:
- 30140c1b
- Parents:
- b56d88f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/raid1.c
rb56d88f rf81960c5 55 55 static errno_t hr_raid1_check_vol_status(hr_volume_t *); 56 56 static errno_t hr_raid1_update_vol_status(hr_volume_t *); 57 static void h andle_extent_error(hr_volume_t *, size_t, errno_t);57 static void hr_raid1_handle_extent_error(hr_volume_t *, size_t, errno_t); 58 58 static errno_t hr_raid1_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t, 59 59 void *, const void *, size_t); … … 268 268 } 269 269 270 static void h andle_extent_error(hr_volume_t *vol, size_t extent,270 static void hr_raid1_handle_extent_error(hr_volume_t *vol, size_t extent, 271 271 errno_t rc) 272 272 { … … 310 310 rc = block_sync_cache(vol->extents[i].svc_id, ba, cnt); 311 311 if (rc != EOK && rc != ENOTSUP) 312 h andle_extent_error(vol, i, rc);312 hr_raid1_handle_extent_error(vol, i, rc); 313 313 else 314 314 successful++; … … 322 322 data_read); 323 323 if (rc != EOK) { 324 h andle_extent_error(vol, i, rc);324 hr_raid1_handle_extent_error(vol, i, rc); 325 325 } else { 326 326 successful++; … … 345 345 data_write); 346 346 if (rc != EOK) 347 h andle_extent_error(vol, i, rc);347 hr_raid1_handle_extent_error(vol, i, rc); 348 348 else 349 349 successful++; … … 434 434 435 435 hr_extent_t *ext; 436 size_t rebuild_ext_idx = bad;437 436 438 437 size_t cnt; … … 448 447 buf); 449 448 if (rc != EOK) { 450 h andle_extent_error(vol, i, rc);449 hr_raid1_handle_extent_error(vol, i, rc); 451 450 if (i + 1 < vol->dev_no) { 452 451 /* still might have one ONLINE */ … … 465 464 rc = block_write_direct(hotspare->svc_id, ba, cnt, buf); 466 465 if (rc != EOK) { 467 handle_extent_error(vol, rebuild_ext_idx, rc); 468 HR_ERROR("rebuild on \"%s\" (%lu), extent number %lu\n", 469 vol->devname, vol->svc_id, rebuild_ext_idx); 466 hr_raid1_handle_extent_error(vol, bad, rc); 467 HR_ERROR("rebuild on \"%s\" (%lu), failed due to " 468 "the rebuilt extent number %lu failing\n", 469 vol->devname, vol->svc_id, bad); 470 470 goto end; 471 471 … … 479 479 "extent number %lu\n", vol->devname, vol->svc_id, hotspare_idx); 480 480 481 hr_update_ext_status(vol, hotspare_idx, HR_EXT_ONLINE);481 hr_update_ext_status(vol, bad, HR_EXT_ONLINE); 482 482 /* 483 483 * For now write metadata at the end, because
Note:
See TracChangeset
for help on using the changeset viewer.