Changeset bbcd06e in mainline


Ignore:
Timestamp:
2025-04-01T10:20:06Z (4 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
ca7fa5b
Parents:
52be5fa
Message:

hr: keep counter only in memory saved metadata

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

Legend:

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

    r52be5fa rbbcd06e  
    6060
    6161        md->counter = 0;
    62         vol->counter = md->counter;
    6362
    6463        uuid_t uuid;
  • uspace/srv/bd/hr/util.c

    r52be5fa rbbcd06e  
    792792        vol->truncated_blkno = main_md->truncated_blkno;
    793793        vol->data_offset = main_md->data_offset;
    794         vol->counter = main_md->counter;
    795794        vol->metadata_version = main_md->version;
    796795        vol->extent_no = main_md->extent_no;
     
    824823
    825824        /*
    826          * TODO: something like mark md dirty or whatever, just sync the
    827          * vol->counter with vol->in_mem_md->counter, or merge them and only
    828          * keep the vol->in_mem_md->counter...
     825         * TODO: something like mark md dirty or whatever
     826         *      - probably will be handled by each md type differently,
     827         *        by specific function pointers
     828         *      - deal with this when foreign md will be handled
    829829         *
    830830         * XXX: if thats the only thing that can change in metadata
     
    836836         * write... but for now leave it here
    837837         */
    838         vol->counter++;
    839         vol->in_mem_md->counter = vol->counter;
     838        vol->in_mem_md->counter++;
    840839
    841840        hr_metadata_save(vol);
  • uspace/srv/bd/hr/var.h

    r52be5fa rbbcd06e  
    7272        hr_fpool_t      *fge;                   /* fibril pool */
    7373
    74         uint32_t         metadata_version; /* XXX: yet unused */
     74        /*
     75         * TODO: also print in info, doesn't have
     76         * to be part of hr_volume_t but just the info
     77         * that is passed to be printed
     78         *
     79         * Probably just defer this decition until foreign md
     80         * will be handled.
     81         */
     82        uint32_t         metadata_version;
    7583
    76         hr_metadata_t   *in_mem_md; /* TODO: implement */
     84        hr_metadata_t   *in_mem_md;
    7785
    7886        /* invariants */
     
    102110        _Atomic uint64_t rebuild_blk;           /* rebuild position */
    103111        _Atomic int      open_cnt;              /* open/close() counter */
    104         uint64_t         counter;               /* TODO: metadata syncing */
    105112        hr_vol_status_t  status;                /* volume status */
    106113} hr_volume_t;
Note: See TracChangeset for help on using the changeset viewer.