Motr  M0
Configuration Schema

DLD of configuration schema. More...

Macros

#define M0_CFG_SDEV_INTERFACE_TYPE_IS_VALID(dtype)   (0 < (dtype) && (dtype) < M0_CFG_DEVICE_INTERFACE_NR)
 
#define M0_CFG_SDEV_MEDIA_TYPE_IS_VALID(dtype)   (0 < (dtype) && (dtype) < M0_CFG_DEVICE_MEDIA_NR)
 
#define M0_CONF_SERVICE_TYPES
 

Enumerations

enum  m0_cfg_state_bit { M0_CFG_STATE_ONLINE = 1 << 0, M0_CFG_STATE_GOOD = 1 << 1 }
 
enum  m0_cfg_flag_bit { M0_CFG_FLAG_REAL = 1 << 0, M0_CFG_FLAG_LITTLE_ENDIAN = 1 << 1, M0_CFG_FLAG_REMOVABLE = 1 << 2 }
 
enum  m0_cfg_nic_type {
  M0_CFG_NIC_ETHER10 = 1, M0_CFG_NIC_ETHER100, M0_CFG_NIC_ETHER1000, M0_CFG_NIC_ETHER10GB,
  M0_CFG_NIC_INFINIBAND
}
 
enum  m0_cfg_storage_device_interface_type {
  M0_CFG_DEVICE_INTERFACE_ATA = 1, M0_CFG_DEVICE_INTERFACE_SATA, M0_CFG_DEVICE_INTERFACE_SCSI, M0_CFG_DEVICE_INTERFACE_SATA2,
  M0_CFG_DEVICE_INTERFACE_SCSI2, M0_CFG_DEVICE_INTERFACE_SAS, M0_CFG_DEVICE_INTERFACE_SAS2, M0_CFG_DEVICE_INTERFACE_NR
}
 
enum  m0_cfg_storage_device_media_type {
  M0_CFG_DEVICE_MEDIA_DISK = 1, M0_CFG_DEVICE_MEDIA_SSD, M0_CFG_DEVICE_MEDIA_TAPE, M0_CFG_DEVICE_MEDIA_ROM,
  M0_CFG_DEVICE_MEDIA_NR
}
 
enum  { M0_CFG_PARAM_LEN = 128 }
 
enum  m0_conf_service_type { M0_CST_NR }
 

Functions

M0_INTERNAL const char * m0_conf_service_type2str (enum m0_conf_service_type type)
 
static bool m0_conf_service_type_is_valid (enum m0_conf_service_type t)
 

Variables

enum m0_cfg_state_bit M0_XCA_ENUM
 

Detailed Description

DLD of configuration schema.

This file defines the interfaces and data structures to store and access the Motr configuration information in database. Motr configuration information is used to describe how a Motr file system is organized by storage, nodes, devices, containers, services, etc.

These data structures are used for on-disk purpose.


Overview

This DLD contains the data structures and routines to organize the configuration information of Motr, to access these information. These configuration information is stored in database, and is populated to clients and servers who are using these information to take the whole Motr system up. These information is cached on clients and servers. These information is treated as resources, which are protected by locks. So configuration may be invalidated and re-acquired (that is update) by users when resources are revoked.

The configuration schema is to provide a way to store, load, and update these informations. How to maintain the relations in-between these data strucctures is done by its upper layer.

See also
HLD of configuration schema : For documentation links, please refer to this file : doc/motr-design-doc-list.rst

Macro Definition Documentation

◆ M0_CFG_SDEV_INTERFACE_TYPE_IS_VALID

#define M0_CFG_SDEV_INTERFACE_TYPE_IS_VALID (   dtype)    (0 < (dtype) && (dtype) < M0_CFG_DEVICE_INTERFACE_NR)

Definition at line 131 of file schema.h.

◆ M0_CFG_SDEV_MEDIA_TYPE_IS_VALID

#define M0_CFG_SDEV_MEDIA_TYPE_IS_VALID (   dtype)    (0 < (dtype) && (dtype) < M0_CFG_DEVICE_MEDIA_NR)

Definition at line 151 of file schema.h.

◆ M0_CONF_SERVICE_TYPES

#define M0_CONF_SERVICE_TYPES
Value:
X_CST(M0_CST__UNUSED) \
X_CST(M0_CST_MDS) \
X_CST(M0_CST_IOS) \
X_CST(M0_CST_CONFD) \
X_CST(M0_CST_RMS) \
X_CST(M0_CST_STATS) \
X_CST(M0_CST_HA) \
X_CST(M0_CST_SSS) \
X_CST(M0_CST_SNS_REP) \
X_CST(M0_CST_SNS_REB) \
X_CST(M0_CST_ADDB2) \
X_CST(M0_CST_CAS) \
X_CST(M0_CST_DIX_REP) \
X_CST(M0_CST_DIX_REB) \
X_CST(M0_CST_DS1) \
X_CST(M0_CST_DS2) \
X_CST(M0_CST_FIS) \
X_CST(M0_CST_FDMI) \
X_CST(M0_CST_BE) \
X_CST(M0_CST_M0T1FS) \
X_CST(M0_CST_CLIENT) \
X_CST(M0_CST_ISCS) \
X_CST(M0_CST_DTM0)
#define X_CST(name)
Definition: schema.h:195

Type of Motr service.

Note
After modifying this enum you should update ‘conf_service_types’ tuple in utils/m0confgen.
Append new values to the end and do not reorder existing values. This is to avoid changing service type values that are hard-coded in Motr conf strings.DTM0 service

Definition at line 169 of file schema.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M0_CFG_PARAM_LEN 

maximum number of params

Definition at line 154 of file schema.h.

◆ m0_cfg_flag_bit

Property flag bits for node, device, nic, etc. These bits can be OR'd and tested.

Enumerator
M0_CFG_FLAG_REAL 

set if real machine, and clear if virtual machine

M0_CFG_FLAG_LITTLE_ENDIAN 

set if Little-endian CPU, and clear if Big-endian CPU

M0_CFG_FLAG_REMOVABLE 

set if a disk/device is removable

Definition at line 85 of file schema.h.

◆ m0_cfg_nic_type

Network interface types.

Enumerator
M0_CFG_NIC_ETHER10 

Ethernet, 10Mb

M0_CFG_NIC_ETHER100 

Ethernet, 100Mb

M0_CFG_NIC_ETHER1000 

Ethernet, 1000Mb

M0_CFG_NIC_ETHER10GB 

Ethernet, 10gb

M0_CFG_NIC_INFINIBAND 

Infini/Band

Definition at line 100 of file schema.h.

◆ m0_cfg_state_bit

state bits for node, device, nic, etc. These bits can be OR'd and tested.

Enumerator
M0_CFG_STATE_ONLINE 

set if Online, and clear if Offline

M0_CFG_STATE_GOOD 

set if Good, and clear if Failed

Definition at line 74 of file schema.h.

◆ m0_cfg_storage_device_interface_type

Motr device interface types.

Enumerator
M0_CFG_DEVICE_INTERFACE_ATA 

ATA

M0_CFG_DEVICE_INTERFACE_SATA 

SATA

M0_CFG_DEVICE_INTERFACE_SCSI 

SCSI

M0_CFG_DEVICE_INTERFACE_SATA2 

SATA II

M0_CFG_DEVICE_INTERFACE_SCSI2 

SCSI II

M0_CFG_DEVICE_INTERFACE_SAS 

SAS

M0_CFG_DEVICE_INTERFACE_SAS2 

SAS II

M0_CFG_DEVICE_INTERFACE_NR 

Definition at line 120 of file schema.h.

◆ m0_cfg_storage_device_media_type

Motr device media types.

Enumerator
M0_CFG_DEVICE_MEDIA_DISK 

spin disk

M0_CFG_DEVICE_MEDIA_SSD 

SSD or flash memory

M0_CFG_DEVICE_MEDIA_TAPE 

tape

M0_CFG_DEVICE_MEDIA_ROM 

read-only memory, like CD

M0_CFG_DEVICE_MEDIA_NR 

Definition at line 136 of file schema.h.

◆ m0_conf_service_type

Enumerator
M0_CST_NR 

Definition at line 194 of file schema.h.

Function Documentation

◆ m0_conf_service_type2str()

M0_INTERNAL const char* m0_conf_service_type2str ( enum m0_conf_service_type  type)

Definition at line 169 of file service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_conf_service_type_is_valid()

static bool m0_conf_service_type_is_valid ( enum m0_conf_service_type  t)
inlinestatic

Definition at line 204 of file schema.h.

Here is the caller graph for this function:

Variable Documentation

◆ M0_XCA_ENUM

enum m0_conf_service_type M0_XCA_ENUM