Changeset 6d0fc11 in mainline for uspace/srv/bd/hr/raid1.c


Ignore:
Timestamp:
2025-03-30T19:38:58Z (4 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
baa4929
Parents:
746e636
Message:

hr: style: align structures, function prototypes

File:
1 edited

Legend:

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

    r746e636 r6d0fc11  
    5454#include "var.h"
    5555
     56static void     hr_raid1_update_vol_status(hr_volume_t *);
     57static void     hr_raid1_ext_state_callback(hr_volume_t *, size_t, errno_t);
     58static size_t   hr_raid1_count_good_extents(hr_volume_t *, uint64_t, size_t,
     59    uint64_t);
     60static errno_t  hr_raid1_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
     61    void *, const void *, size_t);
     62static errno_t  hr_raid1_rebuild(void *);
     63static errno_t  init_rebuild(hr_volume_t *, size_t *);
     64static errno_t  swap_hs(hr_volume_t *, size_t, size_t);
     65static errno_t  hr_raid1_restore_blocks(hr_volume_t *, size_t, uint64_t, size_t,
     66    void *);
     67
     68/* bdops */
     69static errno_t  hr_raid1_bd_open(bd_srvs_t *, bd_srv_t *);
     70static errno_t  hr_raid1_bd_close(bd_srv_t *);
     71static errno_t  hr_raid1_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
     72    size_t);
     73static errno_t  hr_raid1_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
     74static errno_t  hr_raid1_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
     75    const void *, size_t);
     76static errno_t  hr_raid1_bd_get_block_size(bd_srv_t *, size_t *);
     77static errno_t  hr_raid1_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
     78
     79static bd_ops_t hr_raid1_bd_ops = {
     80        .open           = hr_raid1_bd_open,
     81        .close          = hr_raid1_bd_close,
     82        .sync_cache     = hr_raid1_bd_sync_cache,
     83        .read_blocks    = hr_raid1_bd_read_blocks,
     84        .write_blocks   = hr_raid1_bd_write_blocks,
     85        .get_block_size = hr_raid1_bd_get_block_size,
     86        .get_num_blocks = hr_raid1_bd_get_num_blocks
     87};
     88
    5689extern loc_srv_t *hr_srv;
    57 
    58 static void hr_raid1_update_vol_status(hr_volume_t *);
    59 static void hr_raid1_ext_state_callback(hr_volume_t *, size_t, errno_t);
    60 static size_t hr_raid1_count_good_extents(hr_volume_t *, uint64_t, size_t,
    61     uint64_t);
    62 static errno_t hr_raid1_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
    63     void *, const void *, size_t);
    64 static errno_t hr_raid1_rebuild(void *);
    65 static errno_t init_rebuild(hr_volume_t *, size_t *);
    66 static errno_t swap_hs(hr_volume_t *, size_t, size_t);
    67 static errno_t hr_raid1_restore_blocks(hr_volume_t *, size_t, uint64_t, size_t,
    68     void *);
    69 
    70 /* bdops */
    71 static errno_t hr_raid1_bd_open(bd_srvs_t *, bd_srv_t *);
    72 static errno_t hr_raid1_bd_close(bd_srv_t *);
    73 static errno_t hr_raid1_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
    74     size_t);
    75 static errno_t hr_raid1_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
    76 static errno_t hr_raid1_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
    77     const void *, size_t);
    78 static errno_t hr_raid1_bd_get_block_size(bd_srv_t *, size_t *);
    79 static errno_t hr_raid1_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
    80 
    81 static bd_ops_t hr_raid1_bd_ops = {
    82         .open = hr_raid1_bd_open,
    83         .close = hr_raid1_bd_close,
    84         .sync_cache = hr_raid1_bd_sync_cache,
    85         .read_blocks = hr_raid1_bd_read_blocks,
    86         .write_blocks = hr_raid1_bd_write_blocks,
    87         .get_block_size = hr_raid1_bd_get_block_size,
    88         .get_num_blocks = hr_raid1_bd_get_num_blocks
    89 };
    9090
    9191errno_t hr_raid1_create(hr_volume_t *new_volume)
Note: See TracChangeset for help on using the changeset viewer.