Changeset 58d82fa in mainline for uspace/srv/bd/hr/var.h


Ignore:
Timestamp:
2025-01-12T16:53:10Z (6 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
5ee041e
Parents:
ee47537
git-author:
Miroslav Cimerman <mc@…> (2025-01-12 16:49:51)
git-committer:
Miroslav Cimerman <mc@…> (2025-01-12 16:53:10)
Message:

hr: parallelize RAID1

changes in main hr_volume_t struct:

  • new mutex hotspare_lock for protecting hotspares
  • rebuild_blk is _Atomic
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/var.h

    ree47537 r58d82fa  
    4949#define HR_STRIP_SIZE DATA_XFER_LIMIT
    5050
     51struct hr_volume;
    5152typedef struct hr_volume hr_volume_t;
    5253
     
    8788        char devname[HR_DEVNAME_LEN];
    8889
    89         hr_extent_t extents[HR_MAX_EXTENTS];
    9090        size_t hotspare_no;
    9191        hr_extent_t hotspares[HR_MAX_HOTSPARES];
    9292
    93         /* protects ordering (hr_extent_t.svc_id, hotspares) */
     93        /* protects hotspares (hotspares.{svc_id,status}, hotspare_no) */
     94        fibril_mutex_t hotspare_lock;
     95
     96        hr_extent_t extents[HR_MAX_EXTENTS];
     97        /* protects extents ordering (extents.svc_id) */
    9498        fibril_rwlock_t extents_lock;
    95 
    96         /* protects states (hr_extent_t.status, hr_vol_status_t.status) */
     99        /* protects states (extents.status, hr_volume_t.status) */
    97100        fibril_rwlock_t states_lock;
    98101
     
    101104        fibril_mutex_t halt_lock;
    102105
    103         uint64_t rebuild_blk;
     106        _Atomic uint64_t rebuild_blk;
    104107        uint64_t counter; /* metadata syncing */
    105108        hr_vol_status_t status;
Note: See TracChangeset for help on using the changeset viewer.