Changeset 800d188 in mainline for uspace/srv/bd/hr/raid0.c


Ignore:
Timestamp:
2025-04-15T07:00:31Z (2 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
29e7cc7
Parents:
ca7fa5b
git-author:
Miroslav Cimerman <mc@…> (2025-04-15 06:55:25)
git-committer:
Miroslav Cimerman <mc@…> (2025-04-15 07:00:31)
Message:

hr: metadata saving on stop

New bool argument for hr_metadata_save() to indicate if
we want callback too (on array stop we don't, so we won't
init a rebuild).

File:
1 edited

Legend:

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

    rca7fa5b r800d188  
    5454
    5555static void     hr_raid0_update_vol_status(hr_volume_t *);
    56 static void     raid0_state_callback(hr_volume_t *, size_t, errno_t);
     56static void     hr_raid0_state_callback(hr_volume_t *, size_t, errno_t);
    5757static errno_t  hr_raid0_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
    5858    void *, const void *, size_t);
     
    100100        new_volume->hr_bds.sarg = new_volume;
    101101
     102        new_volume->state_callback = hr_raid0_state_callback;
     103
    102104        return EOK;
    103105}
     
    196198static void hr_raid0_update_vol_status(hr_volume_t *vol)
    197199{
     200        fibril_mutex_lock(&vol->md_lock);
     201
     202        /* XXX: will be wrapped in md specific fcn ptrs */
     203        vol->in_mem_md->counter++;
     204
     205        fibril_mutex_unlock(&vol->md_lock);
     206
    198207        fibril_rwlock_read_lock(&vol->states_lock);
    199208
     
    221230}
    222231
    223 static void raid0_state_callback(hr_volume_t *vol, size_t extent, errno_t rc)
     232static void hr_raid0_state_callback(hr_volume_t *vol, size_t extent, errno_t rc)
    224233{
    225234        if (rc == EOK)
     
    272281                        io->type = type;
    273282                        io->vol = vol;
    274                         io->state_callback = raid0_state_callback;
    275283
    276284                        hr_fgroup_submit(group, hr_io_worker, io);
     
    326334                io->type = type;
    327335                io->vol = vol;
    328                 io->state_callback = raid0_state_callback;
    329336
    330337                hr_fgroup_submit(group, hr_io_worker, io);
Note: See TracChangeset for help on using the changeset viewer.