Changeset 7a80c63 in mainline


Ignore:
Timestamp:
2025-03-28T23:40:33Z (4 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
8a65373
Parents:
0437dd5
Message:

hr: raid{0,1,5}.c: increment open() count

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

Legend:

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

    r0437dd5 r7a80c63  
    133133{
    134134        HR_DEBUG("%s()", __func__);
     135
     136        hr_volume_t *vol = bd->srvs->sarg;
     137
     138        atomic_fetch_add_explicit(&vol->open_cnt, 1, memory_order_relaxed);
     139
    135140        return EOK;
    136141}
     
    139144{
    140145        HR_DEBUG("%s()", __func__);
     146
     147        hr_volume_t *vol = bd->srvs->sarg;
     148
     149        atomic_fetch_sub_explicit(&vol->open_cnt, 1, memory_order_relaxed);
     150
    141151        return EOK;
    142152}
  • uspace/srv/bd/hr/raid1.c

    r0437dd5 r7a80c63  
    178178static errno_t hr_raid1_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    179179{
    180         HR_DEBUG("hr_bd_open()\n");
     180        HR_DEBUG("%s()", __func__);
     181
     182        hr_volume_t *vol = bd->srvs->sarg;
     183
     184        atomic_fetch_add_explicit(&vol->open_cnt, 1, memory_order_relaxed);
     185
    181186        return EOK;
    182187}
     
    184189static errno_t hr_raid1_bd_close(bd_srv_t *bd)
    185190{
    186         HR_DEBUG("hr_bd_close()\n");
     191        HR_DEBUG("%s()", __func__);
     192
     193        hr_volume_t *vol = bd->srvs->sarg;
     194
     195        atomic_fetch_sub_explicit(&vol->open_cnt, 1, memory_order_relaxed);
     196
    187197        return EOK;
    188198}
  • uspace/srv/bd/hr/raid5.c

    r0437dd5 r7a80c63  
    196196static errno_t hr_raid5_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    197197{
    198         HR_DEBUG("hr_bd_open()\n");
     198        HR_DEBUG("%s()\n", __func__);
     199
     200        hr_volume_t *vol = bd->srvs->sarg;
     201
     202        atomic_fetch_add_explicit(&vol->open_cnt, 1, memory_order_relaxed);
     203
    199204        return EOK;
    200205}
     
    202207static errno_t hr_raid5_bd_close(bd_srv_t *bd)
    203208{
    204         HR_DEBUG("hr_bd_close()\n");
     209        HR_DEBUG("%s()\n", __func__);
     210
     211        hr_volume_t *vol = bd->srvs->sarg;
     212
     213        atomic_fetch_sub_explicit(&vol->open_cnt, 1, memory_order_relaxed);
     214
    205215        return EOK;
    206216}
Note: See TracChangeset for help on using the changeset viewer.