Changeset 6b8e89b0 in mainline for uspace/srv/bd/hr/raid4.c
- Timestamp:
- 2024-10-05T13:11:11Z (10 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/raid4.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" … … 281 282 } 282 283 284 errno_t hr_raid4_init(hr_volume_t *vol) 285 { 286 errno_t rc; 287 size_t bsize; 288 uint64_t total_blkno; 289 290 assert(vol->level == hr_l_4); 291 292 rc = hr_check_devs(vol, &total_blkno, &bsize); 293 if (rc != EOK) 294 return rc; 295 296 vol->nblocks = total_blkno; 297 vol->bsize = bsize; 298 vol->data_offset = HR_DATA_OFF; 299 vol->data_blkno = vol->nblocks - (vol->data_offset * vol->dev_no) - 300 (vol->nblocks / vol->dev_no); 301 vol->strip_size = HR_STRIP_SIZE; 302 303 return EOK; 304 } 305 283 306 /** @} 284 307 */
Note:
See TracChangeset
for help on using the changeset viewer.