Changeset a0c3080 in mainline for uspace/srv/bd/hr/raid0.c
- Timestamp:
- 2024-11-28T17:09:52Z (15 months ago)
- Children:
- 586b39d
- Parents:
- 65706f1
- File:
-
- 1 edited
-
uspace/srv/bd/hr/raid0.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/raid0.c
r65706f1 ra0c3080 181 181 if (vol->status == HR_VOL_ONLINE) 182 182 return EOK; 183 return EI NVAL;183 return EIO; 184 184 } 185 185 … … 190 190 static errno_t hr_raid0_update_vol_status(hr_volume_t *vol) 191 191 { 192 hr_vol_status_t old_state = vol->status; 193 192 194 for (size_t i = 0; i < vol->extent_no; i++) { 193 195 if (vol->extents[i].status != HR_EXT_ONLINE) { 194 HR_WARN("RAID 0 needs all extents to be ONLINE, " 195 "marking \"%s\" (%lu) as FAULTY", 196 vol->devname, vol->svc_id); 197 vol->status = HR_VOL_FAULTY; 198 return EINVAL; 196 if (old_state != HR_VOL_FAULTY) 197 hr_update_vol_status(vol, HR_VOL_FAULTY); 198 return EIO; 199 199 } 200 200 } 201 201 202 vol->status = HR_VOL_ONLINE; 202 if (old_state != HR_VOL_ONLINE) 203 hr_update_vol_status(vol, HR_VOL_ONLINE); 204 203 205 return EOK; 204 206 } … … 244 246 245 247 left = cnt; 248 246 249 while (left != 0) { 247 250 phys_block = ext_stripe * strip_size + strip_off;
Note:
See TracChangeset
for help on using the changeset viewer.
