Changeset 4d30c475 in mainline
- Timestamp:
- 2025-03-06T19:40:24Z (2 months ago)
- Children:
- 6123753
- Parents:
- b15e534
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/raid1.c
rb15e534 r4d30c475 533 533 hr_add_ba_offset(vol, &ba); 534 534 535 /* 536 * XXX: this is useless here after simplified DI, because 537 * rebuild cannot be triggered while ongoing rebuild 538 */ 535 539 fibril_rwlock_read_lock(&vol->extents_lock); 536 540 … … 538 542 539 543 while (left != 0) { 540 if (vol->halt_please) {541 fibril_rwlock_read_unlock(&vol->extents_lock);542 fibril_mutex_lock(&vol->halt_lock);543 fibril_mutex_unlock(&vol->halt_lock);544 fibril_rwlock_read_lock(&vol->extents_lock);545 }546 547 544 cnt = min(max_blks, left); 548 545 … … 573 570 574 571 hr_update_ext_status(vol, rebuild_idx, HR_EXT_ONLINE); 572 575 573 /* 576 574 * We can be optimistic here, if some extents are … … 723 721 hr_extent_t *ext, *rebuild_ext = &vol->extents[rebuild_idx]; 724 722 723 fibril_rwlock_read_lock(&vol->states_lock); 724 hr_ext_status_t rebuild_ext_status = rebuild_ext->status; 725 fibril_rwlock_read_unlock(&vol->states_lock); 726 727 if (rebuild_ext_status != HR_EXT_REBUILD) 728 return EINVAL; 729 725 730 for (size_t i = 0; i < vol->extent_no; i++) { 726 731 fibril_rwlock_read_lock(&vol->states_lock); 727 728 732 ext = &vol->extents[i]; 729 if (ext->status != HR_EXT_ONLINE) 733 if (ext->status != HR_EXT_ONLINE) { 734 fibril_rwlock_read_unlock(&vol->states_lock); 730 735 continue; 731 736 } 732 737 fibril_rwlock_read_unlock(&vol->states_lock); 733 738
Note:
See TracChangeset
for help on using the changeset viewer.