Motr  M0
m0_conf_obj Struct Reference

#include <obj.h>

Collaboration diagram for m0_conf_obj:
Collaboration graph

Data Fields

struct m0_fid co_id
 
enum m0_conf_status co_status
 
const struct m0_conf_obj_opsco_ops
 
struct m0_conf_objco_parent
 
uint64_t co_nrefs
 
struct m0_chan co_chan
 
enum m0_ha_obj_state co_ha_state
 
struct m0_chan co_ha_chan
 
struct m0_conf_cacheco_cache
 
struct m0_tlink co_cache_link
 
struct m0_tlink co_dir_link
 
uint64_t co_gen_magic
 
uint64_t co_con_magic
 
bool co_deleted
 
const char * co_name
 

Detailed Description

Generic configuration object.

The fields of struct m0_conf_obj are common to all configuration objects. m0_conf_obj is embedded into each concrete configuration object.

Definition at line 206 of file obj.h.

Field Documentation

◆ co_cache

struct m0_conf_cache* co_cache

Configuration cache this object belongs to.

Definition at line 251 of file obj.h.

◆ co_cache_link

struct m0_tlink co_cache_link

Linkage to m0_conf_cache::ca_registry.

Definition at line 254 of file obj.h.

◆ co_chan

struct m0_chan co_chan

Channel on which following events are announced:

  • configuration loading completed;
  • object unpinned.

Definition at line 238 of file obj.h.

◆ co_con_magic

uint64_t co_con_magic

Concrete magic.

Different concrete object types have different values of ->co_con_magic.

This magic value is used for generic-to-concrete casting (see M0_CONF_CAST()).

Definition at line 278 of file obj.h.

◆ co_deleted

bool co_deleted

Whether m0_conf_cache_gc() should garbage-collect this object.

Note
Whoever sets this flag is responsible for calling m0_conf_cache_gc(), otherwise m0_conf_cache_clean() will fail.

Definition at line 287 of file obj.h.

◆ co_dir_link

struct m0_tlink co_dir_link

Linkage to m0_conf_dir::cd_items.

Definition at line 257 of file obj.h.

◆ co_gen_magic

uint64_t co_gen_magic

Generic magic.

All configuration objects have the same value of ->co_gen_magic.

This magic value is used for list operations.

Definition at line 267 of file obj.h.

◆ co_ha_chan

struct m0_chan co_ha_chan

Channel on which .co_ha_state changes are announced (M0_CS_READY objects only). Protected by configuration cache lock (.co_cache->ca_lock).

Definition at line 248 of file obj.h.

◆ co_ha_state

enum m0_ha_obj_state co_ha_state

State of this configuration object, as reported by HA.

Definition at line 241 of file obj.h.

◆ co_id

struct m0_fid co_id

Unique object identifier.

Definition at line 208 of file obj.h.

◆ co_name

const char* co_name

Human-friendly name of the resource represented by this object. To be used in error messages.

Definition at line 293 of file obj.h.

◆ co_nrefs

uint64_t co_nrefs

Reference counter. The object is "pinned" if this value is non-zero.

See also
m0_conf_obj_get(), m0_conf_obj_put()

Definition at line 231 of file obj.h.

◆ co_ops

const struct m0_conf_obj_ops* co_ops

Definition at line 212 of file obj.h.

◆ co_parent

struct m0_conf_obj* co_parent

Pointer to the parent object.

For objects that may have several parents (e.g., m0_conf_node) this points to the object itself.

Note
Do not use obj->co_parent->co_parent chain of pointers. m0_conf_obj_grandparent() is a safer alternative.

Definition at line 223 of file obj.h.

◆ co_status

enum m0_conf_status co_status

Definition at line 210 of file obj.h.


The documentation for this struct was generated from the following file: