Changeset edc89bd8 in mainline
- Timestamp:
- 2025-01-12T21:53:55Z (5 months ago)
- Children:
- e2b417f
- Parents:
- 36661772
- git-author:
- Miroslav Cimerman <mc@…> (2025-01-12 17:19:43)
- git-committer:
- Miroslav Cimerman <mc@…> (2025-01-12 21:53:55)
- Location:
- uspace/srv/bd/hr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/util.c
r36661772 redc89bd8 240 240 } 241 241 242 void hr_update_vol_status(hr_volume_t *vol, hr_vol_status_t s)242 void hr_update_vol_status(hr_volume_t *vol, hr_vol_status_t new) 243 243 { 244 244 assert(fibril_rwlock_is_write_locked(&vol->states_lock)); 245 245 246 246 HR_WARN("\"%s\": changing volume state: %s -> %s\n", vol->devname, 247 hr_get_vol_status_msg(vol->status), hr_get_vol_status_msg(s)); 248 vol->status = s; 247 hr_get_vol_status_msg(vol->status), hr_get_vol_status_msg(new)); 248 vol->status = new; 249 } 250 251 void hr_update_ext_svc_id(hr_volume_t *vol, size_t extent, service_id_t new) 252 { 253 if (vol->level != HR_LVL_0) 254 assert(fibril_rwlock_is_write_locked(&vol->extents_lock)); 255 256 assert(extent < vol->extent_no); 257 258 service_id_t old = vol->extents[extent].svc_id; 259 HR_WARN("\"%s\": changing extent no. %lu svc_id: (%lu) -> (%lu)\n", 260 vol->devname, extent, old, new); 261 vol->extents[extent].svc_id = new; 262 } 263 264 void hr_update_hotspare_svc_id(hr_volume_t *vol, size_t hs, service_id_t new) 265 { 266 assert(fibril_mutex_is_locked(&vol->hotspare_lock)); 267 268 assert(hs < vol->hotspare_no); 269 270 service_id_t old = vol->hotspares[hs].svc_id; 271 HR_WARN("\"%s\": changing hotspare no. %lu svc_id: (%lu) -> (%lu)\n", 272 vol->devname, hs, old, new); 273 vol->hotspares[hs].svc_id = new; 249 274 } 250 275 -
uspace/srv/bd/hr/util.h
r36661772 redc89bd8 60 60 extern void hr_update_hotspare_status(hr_volume_t *, size_t, hr_ext_status_t); 61 61 extern void hr_update_vol_status(hr_volume_t *, hr_vol_status_t); 62 extern void hr_update_ext_svc_id(hr_volume_t *, size_t, service_id_t); 63 extern void hr_update_hotspare_svc_id(hr_volume_t *, size_t, service_id_t); 62 64 extern void hr_sync_all_extents(hr_volume_t *); 63 65 extern size_t hr_count_extents(hr_volume_t *, hr_ext_status_t);
Note:
See TracChangeset
for help on using the changeset viewer.