Changeset 6b8e89b0 in mainline for uspace/srv/bd/hr/raid0.c
- Timestamp:
- 2024-10-05T13:11:11Z (8 months ago)
- Children:
- dceb6e7
- Parents:
- dbd91da
- git-author:
- Miroslav Cimerman <mc@…> (2024-10-05 12:39:13)
- git-committer:
- Miroslav Cimerman <mc@…> (2024-10-05 13:11:11)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/raid0.c
rdbd91da r6b8e89b0 48 48 #include <str_error.h> 49 49 50 #include "superblock.h" 50 51 #include "util.h" 51 52 #include "var.h" … … 233 234 } 234 235 236 errno_t hr_raid0_init(hr_volume_t *vol) 237 { 238 errno_t rc; 239 size_t bsize; 240 uint64_t total_blkno; 241 242 assert(vol->level == hr_l_0); 243 244 rc = hr_check_devs(vol, &total_blkno, &bsize); 245 if (rc != EOK) 246 return rc; 247 248 vol->nblocks = total_blkno; 249 vol->bsize = bsize; 250 vol->data_offset = HR_DATA_OFF; 251 vol->data_blkno = vol->nblocks - (vol->data_offset * vol->dev_no); 252 vol->strip_size = HR_STRIP_SIZE; 253 254 return EOK; 255 } 256 235 257 /** @} 236 258 */
Note:
See TracChangeset
for help on using the changeset viewer.