Changeset 36661772 in mainline
- Timestamp:
- 2025-01-12T21:53:55Z (5 months ago)
- Children:
- edc89bd8
- Parents:
- 3a68baa
- git-author:
- Miroslav Cimerman <mc@…> (2025-01-12 17:03:54)
- git-committer:
- Miroslav Cimerman <mc@…> (2025-01-12 21:53:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/util.c
r3a68baa r36661772 1 1 /* 2 * Copyright (c) 202 4Miroslav Cimerman2 * Copyright (c) 2025 Miroslav Cimerman 3 3 * All rights reserved. 4 4 * … … 93 93 94 94 for (i = 0; i < vol->extent_no; i++) { 95 if (vol->extents[i].s tatus != HR_EXT_MISSING) {95 if (vol->extents[i].svc_id != 0) { 96 96 HR_DEBUG("hr_fini_devs(): block_fini() on (%lu)\n", 97 97 vol->extents[i].svc_id); … … 213 213 void hr_update_ext_status(hr_volume_t *vol, size_t extent, hr_ext_status_t s) 214 214 { 215 if (vol->level != HR_LVL_0) 216 assert(fibril_rwlock_is_locked(&vol->extents_lock)); 217 218 assert(fibril_rwlock_is_write_locked(&vol->states_lock)); 219 215 220 assert(extent < vol->extent_no); 216 221 … … 224 229 void hr_update_hotspare_status(hr_volume_t *vol, size_t hs, hr_ext_status_t s) 225 230 { 231 assert(fibril_mutex_is_locked(&vol->hotspare_lock)); 232 226 233 assert(hs < vol->hotspare_no); 227 234 … … 235 242 void hr_update_vol_status(hr_volume_t *vol, hr_vol_status_t s) 236 243 { 244 assert(fibril_rwlock_is_write_locked(&vol->states_lock)); 245 237 246 HR_WARN("\"%s\": changing volume state: %s -> %s\n", vol->devname, 238 247 hr_get_vol_status_msg(vol->status), hr_get_vol_status_msg(s)); … … 256 265 continue; 257 266 rc = block_sync_cache(vol->extents[i].svc_id, 0, 0); 258 if (rc != EOK && rc != ENOTSUP) { 267 if (rc == ENOMEM || rc == ENOTSUP) 268 continue; 269 if (rc != EOK) { 259 270 if (rc == ENOENT) 260 271 hr_update_ext_status(vol, i, HR_EXT_MISSING); … … 268 279 size_t hr_count_extents(hr_volume_t *vol, hr_ext_status_t status) 269 280 { 281 if (vol->level != HR_LVL_0) 282 assert(fibril_rwlock_is_locked(&vol->extents_lock)); 283 assert(fibril_rwlock_is_locked(&vol->states_lock)); 284 270 285 size_t count = 0; 271 286 for (size_t i = 0; i < vol->extent_no; i++) … … 339 354 void hr_range_lock_release(hr_range_lock_t *rl) 340 355 { 356 if (rl == NULL) 357 return; 358 341 359 HR_RL_LIST_LOCK(rl->vol); 342 360
Note:
See TracChangeset
for help on using the changeset viewer.