Changeset 10291a23 in mainline for uspace/srv/bd/hr/superblock.c


Ignore:
Timestamp:
2025-04-20T14:50:11Z (4 weeks ago)
Author:
Miroslav Cimerman <mc@…>
Children:
f09b75b
Parents:
afec52b4
git-author:
Miroslav Cimerman <mc@…> (2025-04-20 14:48:24)
git-committer:
Miroslav Cimerman <mc@…> (2025-04-20 14:50:11)
Message:

hr: FreeBSD GEOM::MIRROR metadata support

File:
1 edited

Legend:

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

    rafec52b4 r10291a23  
    4646#include <str.h>
    4747
    48 #include "metadata/native.h"
    4948#include "superblock.h"
    5049#include "util.h"
    5150#include "var.h"
    5251
     52#include "metadata/foreign/geom/g_mirror.h"
     53#include "metadata/native.h"
     54
    5355extern hr_superblock_ops_t metadata_native_ops;
     56extern hr_superblock_ops_t metadata_gmirror_ops;
    5457
    5558static hr_superblock_ops_t *hr_superblock_ops_all[] = {
    56         [HR_METADATA_NATIVE] = &metadata_native_ops
     59        [HR_METADATA_NATIVE] = &metadata_native_ops,
     60        [HR_METADATA_GEOM_MIRROR] = &metadata_gmirror_ops
    5761};
    5862
     
    96100                }
    97101
    98                 meta_ops->decode(meta_block, metadata_struct);
     102                rc = meta_ops->decode(meta_block, metadata_struct);
    99103
    100104                free(meta_block);
     105
     106                if (rc != EOK) {
     107                        free(metadata_struct);
     108                        continue;
     109                }
    101110
    102111                if (!meta_ops->has_valid_magic(metadata_struct)) {
Note: See TracChangeset for help on using the changeset viewer.