Changeset 7a80c63 in mainline for uspace/srv/bd/hr/raid1.c


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}
Note: See TracChangeset for help on using the changeset viewer.