Motr  M0
m0_conf_obj_ops Struct Reference

#include <obj_ops.h>

Collaboration diagram for m0_conf_obj_ops:
Collaboration graph

Data Fields

bool(* coo_invariant )(const struct m0_conf_obj *obj)
 
int(* coo_decode )(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
int(* coo_encode )(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
bool(* coo_match )(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
int(* coo_lookup )(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
int(* coo_readdir )(const struct m0_conf_obj *dir, struct m0_conf_obj **pptr)
 
const struct m0_fid **(* coo_downlinks )(const struct m0_conf_obj *obj)
 
void(* coo_delete )(struct m0_conf_obj *obj)
 

Detailed Description

Configuration object operations.

Definition at line 77 of file obj_ops.h.

Field Documentation

◆ coo_decode

int(* coo_decode) (struct m0_conf_obj *dest, const struct m0_confx_obj *src)

Populates concrete object with configuration data taken from m0_confx_obj.

Creates stubs of object's neighbours, if necessary.

Definition at line 87 of file obj_ops.h.

◆ coo_delete

void(* coo_delete) (struct m0_conf_obj *obj)

Finalises concrete fields of given configuration object and frees it.

See also
m0_conf_obj_delete()

Definition at line 159 of file obj_ops.h.

◆ coo_downlinks

const struct m0_fid**(* coo_downlinks) (const struct m0_conf_obj *obj)

Returns NULL-terminated array of the downlink fids of this conf object.

Downlink fid can be passed as ‘name’ parameter to ->coo_lookup().

Note
.coo_downlinks == NULL in the case of m0_conf_dir only.

Definition at line 151 of file obj_ops.h.

◆ coo_encode

int(* coo_encode) (struct m0_confx_obj *dest, const struct m0_conf_obj *src)

Serialises concrete configuration object into its network representation.

Definition at line 94 of file obj_ops.h.

◆ coo_invariant

bool(* coo_invariant) (const struct m0_conf_obj *obj)

Validates concrete fields of given configuration object.

Definition at line 79 of file obj_ops.h.

◆ coo_lookup

int(* coo_lookup) (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)

Finds a child of given object.

Parameters
parentThe object being searched.
nameName of the relation leading to a child object. Identifier of the child object, if parent is a directory.
outIf the function succeeds, *out will point to the sought-for object.
Precondition
parent->co_status == M0_CS_READY
Postcondition
M0_IN(retval, (0, -ENOENT))
ergo(retval == 0, m0_conf_obj_invariant(*out))

Definition at line 118 of file obj_ops.h.

◆ coo_match

bool(* coo_match) (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)

Returns false iff cached configuration object and "flat" object have conflicting data.

Definition at line 101 of file obj_ops.h.

◆ coo_readdir

int(* coo_readdir) (const struct m0_conf_obj *dir, struct m0_conf_obj **pptr)

Gets next directory entry.

Parameters
dirDirectory.
[in]pptr"Current" entry.
[out]pptr"Next" entry.
Return values
M0_CONF_DIRMISSThe next directory entry is missing from configuration cache or is a stub.
M0_CONF_DIRNEXT*pptr now points to the next entry.
M0_CONF_DIRENDEnd of directory is reached.
-ExxxError.

->coo_readdir() puts (m0_conf_obj_put()) the configuration object referred to via ‘pptr’ input parameter.

->coo_readdir() pins (m0_conf_obj_get()) the resulting object in case of M0_CONF_DIRNEXT.

Definition at line 140 of file obj_ops.h.


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