Motr  M0
db.h File Reference
#include "be/tx_credit.h"
#include "be/seg.h"
Include dependency graph for db.h:

Go to the source code of this file.

Macros

#define __MOTR_CONF_DB_H__
 

Functions

M0_INTERNAL int m0_confdb_create_credit (struct m0_be_seg *seg, const struct m0_confx *conf, struct m0_be_tx_credit *accum)
 
M0_INTERNAL int m0_confdb_create (struct m0_be_seg *seg, struct m0_be_tx *tx, const struct m0_confx *conf, const struct m0_fid *btree_fid)
 
M0_INTERNAL void m0_confdb_fini (struct m0_be_seg *seg)
 
M0_INTERNAL void m0_confdb_destroy_credit (struct m0_be_seg *seg, struct m0_be_tx_credit *accum)
 
M0_INTERNAL int m0_confdb_destroy (struct m0_be_seg *seg, struct m0_be_tx *tx)
 
M0_INTERNAL int m0_confdb_read (struct m0_be_seg *seg, struct m0_confx **out)
 

Macro Definition Documentation

◆ __MOTR_CONF_DB_H__

#define __MOTR_CONF_DB_H__

Definition at line 24 of file db.h.

Function Documentation

◆ m0_confdb_create()

M0_INTERNAL int m0_confdb_create ( struct m0_be_seg seg,
struct m0_be_tx tx,
const struct m0_confx conf,
const struct m0_fid btree_fid 
)

Creates configuration database, populating it with provided configuration data.

Precondition
conf->cx_nr > 0

Definition at line 331 of file db.c.

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

◆ m0_confdb_create_credit()

M0_INTERNAL int m0_confdb_create_credit ( struct m0_be_seg seg,
const struct m0_confx conf,
struct m0_be_tx_credit accum 
)

Calculates BE credits required by configuration database tables and .

Definition at line 255 of file db.c.

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

◆ m0_confdb_destroy()

M0_INTERNAL int m0_confdb_destroy ( struct m0_be_seg seg,
struct m0_be_tx tx 
)

Definition at line 443 of file db.c.

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

◆ m0_confdb_destroy_credit()

M0_INTERNAL void m0_confdb_destroy_credit ( struct m0_be_seg seg,
struct m0_be_tx_credit accum 
)

Calculates BE credits in-order to destroy configuration database from persistent store.

Definition at line 380 of file db.c.

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

◆ m0_confdb_fini()

M0_INTERNAL void m0_confdb_fini ( struct m0_be_seg seg)

Finalises in-memory configuration database.

Definition at line 464 of file db.c.

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

◆ m0_confdb_read()

M0_INTERNAL int m0_confdb_read ( struct m0_be_seg seg,
struct m0_confx **  out 
)

Creates m0_confx and populates it with data read from a configuration database.

Note
If the call succeeds, the user is responsible for freeing allocated memory with m0_confx_free(*out).

Definition at line 544 of file db.c.

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