Changeset 80c760e in mainline for uspace/srv/bd/hr/metadata/native.c


Ignore:
Timestamp:
2025-04-21T12:34:02Z (3 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
75262d2f
Parents:
18c3658
Message:

hr: remove truncated_blkno calculation from raid*.c

Calculate the initial truncated_blkno in hr_init_extents_from_cfg,
allowing the removal of hr_extent_t.blkno.

Also fixes double block_fini() on failed volume creation in
hr_util_try_assemble().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/metadata/native.c

    r18c3658 r80c760e  
    139139        HR_DEBUG("%s()", __func__);
    140140
    141         errno_t rc = EOK;
    142 
    143141        hr_metadata_t *main_meta = NULL;
    144142        size_t max_counter_val = 0;
     
    169167
    170168                vol->extents[iter_meta->index].svc_id = iter->svc_id;
    171 
    172                 uint64_t blkno;
    173                 rc = block_get_nblocks(iter->svc_id, &blkno);
    174                 if (rc != EOK)
    175                         goto error;
    176 
    177                 vol->extents[iter_meta->index].blkno = blkno;
     169                iter->fini = false;
    178170
    179171                if (iter_meta->counter == max_counter_val)
     
    188180        }
    189181
    190 error:
    191         return rc;
     182        return EOK;
    192183}
    193184
Note: See TracChangeset for help on using the changeset viewer.