Changeset 75262d2f in mainline


Ignore:
Timestamp:
2025-04-21T12:37:19Z (4 weeks ago)
Author:
Miroslav Cimerman <mc@…>
Children:
b883aa8
Parents:
80c760e
Message:

hr: util.c: hr_create_vol_struct() style

File:
1 edited

Legend:

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

    r80c760e r75262d2f  
    9090        vol->meta_ops = get_type_ops(metadata_type);
    9191
     92        uint8_t meta_flags = vol->meta_ops->get_flags();
     93
    9294        switch (level) {
    9395        case HR_LVL_0:
     
    100102                vol->hr_ops.init = hr_raid1_init;
    101103                vol->hr_ops.status_event = hr_raid1_status_event;
    102                 if (vol->meta_ops->get_flags() & HR_METADATA_HOTSPARE_SUPPORT)
     104                if (meta_flags & HR_METADATA_HOTSPARE_SUPPORT)
    103105                        vol->hr_ops.add_hotspare = hr_raid1_add_hotspare;
    104106                break;
     
    107109                vol->hr_ops.init = hr_raid5_init;
    108110                vol->hr_ops.status_event = hr_raid5_status_event;
    109                 if (vol->meta_ops->get_flags() & HR_METADATA_HOTSPARE_SUPPORT)
     111                if (meta_flags & HR_METADATA_HOTSPARE_SUPPORT)
    110112                        vol->hr_ops.add_hotspare = hr_raid5_add_hotspare;
    111113                break;
     
    114116                vol->hr_ops.init = hr_raid5_init;
    115117                vol->hr_ops.status_event = hr_raid5_status_event;
    116                 if (vol->meta_ops->get_flags() & HR_METADATA_HOTSPARE_SUPPORT)
     118                if (meta_flags & HR_METADATA_HOTSPARE_SUPPORT)
    117119                        vol->hr_ops.add_hotspare = hr_raid5_add_hotspare;
    118120                break;
Note: See TracChangeset for help on using the changeset viewer.