Changeset 5ee041e in mainline for uspace/srv/bd/hr/var.h


Ignore:
Timestamp:
2025-01-12T17:02:39Z (6 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
3a68baa
Parents:
58d82fa
Message:

hr: RAID1: deferred extent invalidation

File:
1 edited

Legend:

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

    r58d82fa r5ee041e  
    5959} hr_ops_t;
    6060
     61typedef struct hr_deferred_invalidation {
     62        link_t link;
     63        size_t index;
     64        service_id_t svc_id;
     65} hr_deferred_invalidation_t;
     66
    6167typedef struct hr_volume {
    6268        hr_ops_t hr_ops;
     
    8995
    9096        size_t hotspare_no;
    91         hr_extent_t hotspares[HR_MAX_HOTSPARES];
     97        hr_extent_t hotspares[HR_MAX_HOTSPARES + HR_MAX_EXTENTS];
    9298
    9399        /* protects hotspares (hotspares.{svc_id,status}, hotspare_no) */
     
    103109        bool halt_please;
    104110        fibril_mutex_t halt_lock;
     111
     112        /*
     113         * For deferring invalidations of extents. Used when
     114         * an extent has to be invalidated (got ENOMEM on a WRITE),
     115         * but workers - therefore state callbacks cannot lock
     116         * extents for writing (they are readers), so invalidations
     117         * are harvested later when we are able to.
     118         */
     119        fibril_mutex_t deferred_list_lock;
     120        list_t deferred_invalidations_list;
     121        hr_deferred_invalidation_t deferred_inval[HR_MAX_EXTENTS];
    105122
    106123        _Atomic uint64_t rebuild_blk;
Note: See TracChangeset for help on using the changeset viewer.