Changeset 746e636 in mainline


Ignore:
Timestamp:
2025-03-30T16:17:37Z (3 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
6d0fc11
Parents:
d082801
Message:

hr: add comments to raid init()

Location:
uspace/srv/bd/hr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/raid0.c

    rd082801 r746e636  
    100100}
    101101
     102/*
     103 * Called only once in volume's lifetime.
     104 */
    102105errno_t hr_raid0_init(hr_volume_t *vol)
    103106{
     
    114117        vol->nblocks = total_blkno;
    115118        vol->bsize = bsize;
     119        /*
     120         * XXX: according to bsize set the data_offset...
     121         *
     122         * also can change this depending on level, like
     123         * RAID5 might try to put data at 64K boundary
     124         */
    116125        vol->data_offset = HR_DATA_OFF;
    117126        vol->data_blkno = vol->nblocks - (vol->data_offset * vol->extent_no);
  • uspace/srv/bd/hr/raid1.c

    rd082801 r746e636  
    115115}
    116116
     117/*
     118 * Called only once in volume's lifetime.
     119 */
    117120errno_t hr_raid1_init(hr_volume_t *vol)
    118121{
     
    129132        vol->nblocks = total_blkno / vol->extent_no;
    130133        vol->bsize = bsize;
     134        /*
     135         * XXX: according to bsize set the data_offset...
     136         *
     137         * also can change this depending on level, like
     138         * RAID5 might try to put data at 64K boundary
     139         */
    131140        vol->data_offset = HR_DATA_OFF;
    132141        vol->data_blkno = vol->nblocks - vol->data_offset;
  • uspace/srv/bd/hr/raid5.c

    rd082801 r746e636  
    11/*
    2  * Copyright (c) 2024 Miroslav Cimerman
     2 * Copyright (c) 2025 Miroslav Cimerman
    33 * All rights reserved.
    44 *
     
    117117}
    118118
     119/*
     120 * Called only once in volume's lifetime.
     121 */
    119122errno_t hr_raid5_init(hr_volume_t *vol)
    120123{
     
    131134        vol->nblocks = total_blkno;
    132135        vol->bsize = bsize;
     136        /*
     137         * XXX: according to bsize set the data_offset...
     138         *
     139         * also can change this depending on level, like
     140         * RAID5 might try to put data at 64K boundary
     141         */
    133142        vol->data_offset = HR_DATA_OFF;
    134143        vol->data_blkno = vol->nblocks - (vol->data_offset * vol->extent_no) -
Note: See TracChangeset for help on using the changeset viewer.