Changeset 6b8e89b0 in mainline for uspace/srv/bd/hr/raid1.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/raid1.c
rdbd91da r6b8e89b0 47 47 #include <str_error.h> 48 48 49 #include "superblock.h" 49 50 #include "util.h" 50 51 #include "var.h" … … 201 202 } 202 203 204 errno_t hr_raid1_init(hr_volume_t *vol) 205 { 206 errno_t rc; 207 size_t bsize; 208 uint64_t total_blkno; 209 210 assert(vol->level == hr_l_1); 211 212 rc = hr_check_devs(vol, &total_blkno, &bsize); 213 if (rc != EOK) 214 return rc; 215 216 vol->nblocks = total_blkno / vol->dev_no; 217 vol->bsize = bsize; 218 vol->data_offset = HR_DATA_OFF; 219 vol->data_blkno = vol->nblocks - vol->data_offset; 220 vol->strip_size = 0; 221 222 return EOK; 223 } 224 203 225 /** @} 204 226 */
Note:
See TracChangeset
for help on using the changeset viewer.