Motr  M0
Confd_stob

Macros

#define M0_CONFD_FID(old_version, new_version, tx_id)
 

Enumerations

enum  { M0_CONFD_STOB_DOMAIN_KEY = 0x33C0FDD077 }
 

Functions

int m0_confd_stob_init (struct m0_stob **stob, const char *location, struct m0_fid *confd_fid)
 
void m0_confd_stob_fini (struct m0_stob *stob)
 
static m0_bcount_t confd_stob_length (struct m0_stob *stob)
 
int m0_confd_stob_read (struct m0_stob *stob, char **str)
 
int m0_confd_stob_bufvec_write (struct m0_stob *stob, struct m0_bufvec *bufvec)
 
int m0_confd_stob_write (struct m0_stob *stob, char *str)
 
M0_INTERNAL int m0_conf_stob_location_generate (struct m0_fom *fom, char **location)
 

Detailed Description

Macro Definition Documentation

◆ M0_CONFD_FID

#define M0_CONFD_FID (   old_version,
  new_version,
  tx_id 
)
Value:
M0_FID_INIT((uint64_t)(old_version) << 32 | (uint64_t)(new_version), \
(tx_id))
#define M0_FID_INIT(container, key)
Definition: fid.h:84

Generate IO stob fid for confd file configuration.

Definition at line 39 of file confd_stob.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M0_CONFD_STOB_DOMAIN_KEY 

Definition at line 45 of file confd_stob.c.

Function Documentation

◆ confd_stob_length()

static m0_bcount_t confd_stob_length ( struct m0_stob stob)
static

Definition at line 121 of file confd_stob.c.

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

◆ m0_conf_stob_location_generate()

M0_INTERNAL int m0_conf_stob_location_generate ( struct m0_fom fom,
char **  location 
)

Generates stob domain location Result location is "linuxstob:PATH/configure", where PATH is path to confd configure file.

Precondition
fom != NULL
location != NULL

Definition at line 181 of file confd_stob.c.

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

◆ m0_confd_stob_bufvec_write()

M0_INTERNAL int m0_confd_stob_bufvec_write ( struct m0_stob stob,
struct m0_bufvec bufvec 
)

Writes data to stob

Precondition
stob != NULL
bufvec != NULL

Definition at line 159 of file confd_stob.c.

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

◆ m0_confd_stob_fini()

M0_INTERNAL void m0_confd_stob_fini ( struct m0_stob stob)

Finalize stob for confd file configuration Finalize stob domain and put stob.

Precondition
stob != NULL

Definition at line 104 of file confd_stob.c.

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

◆ m0_confd_stob_init()

M0_INTERNAL int m0_confd_stob_init ( struct m0_stob **  stob,
const char *  location,
struct m0_fid confd_fid 
)

Initialise stob for confd file configuration. Create/init stob domain by location and create/init stob by FID.

Precondition
stob != NULL
location != NULL
fid != NULL

Definition at line 50 of file confd_stob.c.

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

◆ m0_confd_stob_read()

M0_INTERNAL int m0_confd_stob_read ( struct m0_stob stob,
char **  str 
)

Reads data from stob as simple string Get data length (if stob type is linuxstob), allocate memory for string and read data. Note! For allocate uses m0_alloc_alingned. Free must be used like m0_free_aligned(str, strlen(str) + 1, m0_stob_block_shift(stob))

Precondition
stob != NULL
str != NULL

Definition at line 135 of file confd_stob.c.

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

◆ m0_confd_stob_write()

M0_INTERNAL int m0_confd_stob_write ( struct m0_stob stob,
char *  str 
)

Writes data to stob as simple string

Precondition
stob != NULL
str != NULL
m0_addr_is_aligned(str, m0_stob_block_shift(stob))

Definition at line 168 of file confd_stob.c.

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