Changeset 6d0fc11 in mainline for uspace/srv/bd/hr/raid5.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/raid5.c

    r746e636 r6d0fc11  
    5353#include "var.h"
    5454
     55static errno_t  hr_raid5_vol_usable(hr_volume_t *);
     56static ssize_t  hr_raid5_get_bad_ext(hr_volume_t *);
     57static errno_t  hr_raid5_update_vol_status(hr_volume_t *);
     58static void     hr_raid5_handle_extent_error(hr_volume_t *, size_t, errno_t);
     59static void     xor(void *, const void *, size_t);
     60static errno_t  hr_raid5_read_degraded(hr_volume_t *, uint64_t, uint64_t,
     61    void *, size_t);
     62static errno_t  hr_raid5_write(hr_volume_t *, uint64_t, uint64_t, aoff64_t,
     63    const void *, size_t);
     64static errno_t  hr_raid5_write_parity(hr_volume_t *, uint64_t, uint64_t,
     65    uint64_t, const void *, size_t);
     66static errno_t  hr_raid5_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
     67    void *, const void *, size_t);
     68static errno_t  hr_raid5_rebuild(void *);
     69
     70/* bdops */
     71static errno_t  hr_raid5_bd_open(bd_srvs_t *, bd_srv_t *);
     72static errno_t  hr_raid5_bd_close(bd_srv_t *);
     73static errno_t  hr_raid5_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
     74    size_t);
     75static errno_t  hr_raid5_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
     76static errno_t  hr_raid5_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
     77    const void *, size_t);
     78static errno_t  hr_raid5_bd_get_block_size(bd_srv_t *, size_t *);
     79static errno_t  hr_raid5_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
     80
     81static bd_ops_t hr_raid5_bd_ops = {
     82        .open           = hr_raid5_bd_open,
     83        .close          = hr_raid5_bd_close,
     84        .sync_cache     = hr_raid5_bd_sync_cache,
     85        .read_blocks    = hr_raid5_bd_read_blocks,
     86        .write_blocks   = hr_raid5_bd_write_blocks,
     87        .get_block_size = hr_raid5_bd_get_block_size,
     88        .get_num_blocks = hr_raid5_bd_get_num_blocks
     89};
     90
    5591extern loc_srv_t *hr_srv;
    56 
    57 static errno_t hr_raid5_vol_usable(hr_volume_t *);
    58 static ssize_t hr_raid5_get_bad_ext(hr_volume_t *);
    59 static errno_t hr_raid5_update_vol_status(hr_volume_t *);
    60 static void hr_raid5_handle_extent_error(hr_volume_t *, size_t, errno_t);
    61 static void xor(void *, const void *, size_t);
    62 static errno_t hr_raid5_read_degraded(hr_volume_t *, uint64_t, uint64_t,
    63     void *, size_t);
    64 static errno_t hr_raid5_write(hr_volume_t *, uint64_t, uint64_t, aoff64_t,
    65     const void *, size_t);
    66 static errno_t hr_raid5_write_parity(hr_volume_t *, uint64_t, uint64_t,
    67     uint64_t, const void *, size_t);
    68 static errno_t hr_raid5_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
    69     void *, const void *, size_t);
    70 static errno_t hr_raid5_rebuild(void *);
    71 
    72 /* bdops */
    73 static errno_t hr_raid5_bd_open(bd_srvs_t *, bd_srv_t *);
    74 static errno_t hr_raid5_bd_close(bd_srv_t *);
    75 static errno_t hr_raid5_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
    76     size_t);
    77 static errno_t hr_raid5_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
    78 static errno_t hr_raid5_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
    79     const void *, size_t);
    80 static errno_t hr_raid5_bd_get_block_size(bd_srv_t *, size_t *);
    81 static errno_t hr_raid5_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
    82 
    83 static bd_ops_t hr_raid5_bd_ops = {
    84         .open = hr_raid5_bd_open,
    85         .close = hr_raid5_bd_close,
    86         .sync_cache = hr_raid5_bd_sync_cache,
    87         .read_blocks = hr_raid5_bd_read_blocks,
    88         .write_blocks = hr_raid5_bd_write_blocks,
    89         .get_block_size = hr_raid5_bd_get_block_size,
    90         .get_num_blocks = hr_raid5_bd_get_num_blocks
    91 };
    9292
    9393errno_t hr_raid5_create(hr_volume_t *new_volume)
Note: See TracChangeset for help on using the changeset viewer.