Changeset ca212a51 in mainline
- Timestamp:
- 2025-07-11T20:13:38Z (12 days ago)
- Children:
- a0abd46
- Parents:
- b127da2f
- Location:
- uspace/srv/bd/hr
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/raid0.c
rb127da2f rca212a51 123 123 vol->data_blkno -= vol->meta_ops->get_size() * vol->extent_no; 124 124 125 vol->strip_size = HR_STRIP_SIZE;125 vol->strip_size = hr_closest_pow2(HR_STRIP_SIZE / vol->extent_no); 126 126 127 127 return EOK; -
uspace/srv/bd/hr/raid5.c
rb127da2f rca212a51 131 131 vol->data_blkno = single_sz * (vol->extent_no - 1); 132 132 133 vol->strip_size = HR_STRIP_SIZE;133 vol->strip_size = hr_closest_pow2(HR_STRIP_SIZE / (vol->extent_no - 1)); 134 134 135 135 if (vol->level == HR_LVL_4) -
uspace/srv/bd/hr/util.c
rb127da2f rca212a51 1254 1254 } 1255 1255 1256 uint32_t hr_closest_pow2(uint32_t n) 1257 { 1258 if (n == 0) 1259 return 0; 1260 1261 n |= (n >> 1); 1262 n |= (n >> 2); 1263 n |= (n >> 4); 1264 n |= (n >> 8); 1265 n |= (n >> 16); 1266 return n - (n >> 1); 1267 } 1268 1256 1269 /** @} 1257 1270 */ -
uspace/srv/bd/hr/util.h
rb127da2f rca212a51 111 111 extern errno_t hr_sync_extents(hr_volume_t *); 112 112 extern errno_t hr_init_rebuild(hr_volume_t *, size_t *); 113 extern uint32_t hr_closest_pow2(uint32_t); 113 114 114 115 #endif
Note:
See TracChangeset
for help on using the changeset viewer.