Motr  M0
Cob-fid namespace iterator

Data Structures

struct  m0_cob_fid_ns_iter
 

Functions

M0_INTERNAL int m0_cob_ns_iter_init (struct m0_cob_fid_ns_iter *iter, struct m0_fid *gfid, struct m0_cob_domain *cdom)
 
M0_INTERNAL int m0_cob_ns_iter_next (struct m0_cob_fid_ns_iter *iter, struct m0_fid *gfid, struct m0_cob_nsrec **nsrec)
 
M0_INTERNAL int m0_cob_ns_rec_of (struct m0_be_btree *cob_namespace, const struct m0_fid *key_gfid, struct m0_fid *next_gfid, struct m0_cob_nsrec **nsrec)
 
M0_INTERNAL void m0_cob_ns_iter_fini (struct m0_cob_fid_ns_iter *iter)
 

Detailed Description

The cob on data server has cob nskey = <gob_fid, cob_index>, where, gob_fid : global file identifier corresponding to which the cob is being created. cob_index : unique index of the cob in the pool.

See also
m0_cob_nskey

The cob-fid iterator uniquely iterates over gob_fids, thus skipping entries with same gob_fids but different cob_index.

This iterator is used in SNS repair iterator.

See also
m0_sns_repair_iter

Function Documentation

◆ m0_cob_ns_iter_fini()

M0_INTERNAL void m0_cob_ns_iter_fini ( struct m0_cob_fid_ns_iter iter)

Finalises the namespace iterator.

Parameters
iter- Namespace iterator that is to be finalised.

Definition at line 123 of file ns_iter.c.

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

◆ m0_cob_ns_iter_init()

M0_INTERNAL int m0_cob_ns_iter_init ( struct m0_cob_fid_ns_iter iter,
struct m0_fid gfid,
struct m0_cob_domain cdom 
)

Initialises the namespace iterator.

Parameters
iter- Cob fid namespace iterator that is to be initialised.
gfid- Initial gob-fid with which iterator is initialised.
dbenv- DB environment from which the records should be extracted.
cdom- Cob domain.

Definition at line 40 of file ns_iter.c.

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

◆ m0_cob_ns_iter_next()

M0_INTERNAL int m0_cob_ns_iter_next ( struct m0_cob_fid_ns_iter iter,
struct m0_fid gfid,
struct m0_cob_nsrec **  nsrec 
)

Iterates over namespace to point to unique gob fid in the namespace.

Parameters
iter- Pointer to the namespace iterator.
tx- Database transaction used for DB operations by iterator.
gfid- Next unique gob-fid in the iterator. This is output variable.

Definition at line 100 of file ns_iter.c.

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

◆ m0_cob_ns_rec_of()

M0_INTERNAL int m0_cob_ns_rec_of ( struct m0_be_btree cob_namespace,
const struct m0_fid key_gfid,
struct m0_fid next_gfid,
struct m0_cob_nsrec **  nsrec 
)

Definition at line 56 of file ns_iter.c.

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