Changeset 8a65373 in mainline
- Timestamp:
- 2025-03-29T11:50:54Z (3 months ago)
- Children:
- 56214383
- Parents:
- 7a80c63
- Location:
- uspace/srv/bd/hr
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/hr.c
r7a80c63 r8a65373 144 144 for (i = 0; i < cfg->dev_no; i++) { 145 145 if (cfg->devs[i] == 0) { 146 /* 147 * XXX: own error codes, no need to log this... 148 * its user error not service error 149 */ 146 150 HR_ERROR("missing device provided for array " 147 151 "creation, aborting"); … … 202 206 203 207 rc = new_volume->hr_ops.create(new_volume); 208 if (rc != EOK) 209 goto error; 210 211 rc = hr_register_volume(new_volume); 204 212 if (rc != EOK) 205 213 goto error; -
uspace/srv/bd/hr/raid0.c
r7a80c63 r8a65373 82 82 errno_t hr_raid0_create(hr_volume_t *new_volume) 83 83 { 84 errno_t rc;85 86 84 assert(new_volume->level == HR_LVL_0); 87 85 … … 99 97 new_volume->hr_bds.sarg = new_volume; 100 98 101 rc = hr_register_volume(new_volume); 102 103 return rc; 99 return EOK; 104 100 } 105 101 -
uspace/srv/bd/hr/raid1.c
r7a80c63 r8a65373 91 91 errno_t hr_raid1_create(hr_volume_t *new_volume) 92 92 { 93 errno_t rc;94 95 93 assert(new_volume->level == HR_LVL_1); 96 94 … … 114 112 return EINVAL; 115 113 116 rc = hr_register_volume(new_volume); 117 118 return rc; 114 return EOK; 119 115 } 120 116 -
uspace/srv/bd/hr/raid5.c
r7a80c63 r8a65373 93 93 errno_t hr_raid5_create(hr_volume_t *new_volume) 94 94 { 95 errno_t rc;96 97 95 assert(new_volume->level == HR_LVL_5 || new_volume->level == HR_LVL_4); 98 96 … … 104 102 fibril_rwlock_write_lock(&new_volume->states_lock); 105 103 106 rc = hr_raid5_update_vol_status(new_volume);104 errno_t rc = hr_raid5_update_vol_status(new_volume); 107 105 if (rc != EOK) { 108 106 fibril_rwlock_write_unlock(&new_volume->states_lock); … … 114 112 new_volume->hr_bds.sarg = new_volume; 115 113 116 rc = hr_register_volume(new_volume);117 118 114 fibril_rwlock_write_unlock(&new_volume->states_lock); 119 115 120 return rc;116 return EOK; 121 117 } 122 118 -
uspace/srv/bd/hr/util.c
r7a80c63 r8a65373 835 835 * XXX: register it here 836 836 * ... if it fails on EEXIST try different name... like + 1 on the end 837 * 838 * TODO: discuss 837 839 */ 840 rc = hr_register_volume(vol); 841 if (rc != EOK) { 842 fibril_rwlock_write_unlock(&hr_volumes_lock); 843 goto error; 844 } 838 845 839 846 list_append(&vol->lvolumes, &hr_volumes);
Note:
See TracChangeset
for help on using the changeset viewer.