Changeset 7b359f5 in mainline
- Timestamp:
- 2024-11-15T21:45:31Z (6 months ago)
- Children:
- e76e12d8
- Parents:
- d199a6f
- Location:
- uspace/srv/bd/hr
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/hr.c
rd199a6f r7b359f5 190 190 new_volume->hr_ops.create = hr_raid1_create; 191 191 new_volume->hr_ops.init = hr_raid1_init; 192 new_volume->hr_ops.status_event = hr_raid1_status_event; 192 193 break; 193 194 case HR_LVL_0: 194 195 new_volume->hr_ops.create = hr_raid0_create; 195 196 new_volume->hr_ops.init = hr_raid0_init; 197 new_volume->hr_ops.status_event = hr_raid0_status_event; 196 198 break; 197 199 case HR_LVL_4: 198 200 new_volume->hr_ops.create = hr_raid4_create; 199 201 new_volume->hr_ops.init = hr_raid4_init; 202 new_volume->hr_ops.status_event = hr_raid4_status_event; 200 203 break; 201 204 case HR_LVL_5: 202 205 new_volume->hr_ops.create = hr_raid5_create; 203 206 new_volume->hr_ops.init = hr_raid5_init; 207 new_volume->hr_ops.status_event = hr_raid5_status_event; 204 208 break; 205 209 default: … … 277 281 hr_update_ext_status(vol, fail_extent, HR_EXT_FAILED); 278 282 fibril_mutex_unlock(&vol->lock); 283 284 vol->hr_ops.status_event(vol); 279 285 } 280 286 async_answer_0(icall, rc); -
uspace/srv/bd/hr/raid0.c
rd199a6f r7b359f5 125 125 } 126 126 127 void hr_raid0_status_event(hr_volume_t *vol) 128 { 129 fibril_mutex_lock(&vol->lock); 130 (void) hr_raid0_update_vol_status(vol); 131 fibril_mutex_unlock(&vol->lock); 132 } 133 127 134 static errno_t hr_raid0_bd_open(bd_srvs_t *bds, bd_srv_t *bd) 128 135 { -
uspace/srv/bd/hr/raid1.c
rd199a6f r7b359f5 125 125 } 126 126 127 void hr_raid1_status_event(hr_volume_t *vol) 128 { 129 fibril_mutex_lock(&vol->lock); 130 (void) hr_raid1_update_vol_status(vol); 131 fibril_mutex_unlock(&vol->lock); 132 } 133 127 134 static errno_t hr_raid1_bd_open(bd_srvs_t *bds, bd_srv_t *bd) 128 135 { -
uspace/srv/bd/hr/raid4.c
rd199a6f r7b359f5 136 136 137 137 return EOK; 138 } 139 140 void hr_raid4_status_event(hr_volume_t *vol) 141 { 142 fibril_mutex_lock(&vol->lock); 143 (void) hr_raid4_update_vol_status(vol); 144 fibril_mutex_unlock(&vol->lock); 138 145 } 139 146 -
uspace/srv/bd/hr/raid5.c
rd199a6f r7b359f5 133 133 134 134 return EOK; 135 } 136 137 void hr_raid5_status_event(hr_volume_t *vol) 138 { 139 fibril_mutex_lock(&vol->lock); 140 (void) hr_raid5_update_vol_status(vol); 141 fibril_mutex_unlock(&vol->lock); 135 142 } 136 143 -
uspace/srv/bd/hr/var.h
rd199a6f r7b359f5 50 50 errno_t (*create)(hr_volume_t *); 51 51 errno_t (*init)(hr_volume_t *); 52 void (*status_event)(hr_volume_t *); 52 53 } hr_ops_t; 53 54 … … 89 90 extern errno_t hr_raid5_init(hr_volume_t *); 90 91 92 extern void hr_raid0_status_event(hr_volume_t *); 93 extern void hr_raid1_status_event(hr_volume_t *); 94 extern void hr_raid4_status_event(hr_volume_t *); 95 extern void hr_raid5_status_event(hr_volume_t *); 96 91 97 #endif 92 98
Note:
See TracChangeset
for help on using the changeset viewer.