Motr
M0
|
Detailed Functional Specification. More...
Data Structures | |
struct | m0_conf_obj_ops |
Enumerations | |
enum | m0_conf_dirval { M0_CONF_DIREND = 0, M0_CONF_DIRNEXT, M0_CONF_DIRMISS } |
Functions | |
M0_INTERNAL struct m0_conf_obj * | m0_conf_obj_create (const struct m0_fid *id, struct m0_conf_cache *cache) |
M0_INTERNAL int | m0_conf_obj_find (struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out) |
M0_INTERNAL int | m0_conf_obj_find_lock (struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out) |
M0_INTERNAL void | m0_conf_obj_delete (struct m0_conf_obj *obj) |
M0_INTERNAL bool | m0_conf_obj_invariant (const struct m0_conf_obj *obj) |
M0_INTERNAL void | m0_conf_obj_get (struct m0_conf_obj *obj) |
M0_INTERNAL void | m0_conf_obj_get_lock (struct m0_conf_obj *obj) |
M0_INTERNAL void | m0_conf_obj_put (struct m0_conf_obj *obj) |
M0_INTERNAL int | m0_conf_obj_fill (struct m0_conf_obj *dest, const struct m0_confx_obj *src) |
M0_INTERNAL bool | m0_conf_obj_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat) |
Detailed Functional Specification.
enum m0_conf_dirval |
Symbolic names for m0_conf_obj_ops::coo_readdir() return values.
M0_INTERNAL struct m0_conf_obj* m0_conf_obj_create | ( | const struct m0_fid * | id, |
struct m0_conf_cache * | cache | ||
) |
Allocates and initialises configuration object of given type.
Copies ‘id’ into ->co_id of the resulting object.
Note, that m0_conf_obj_create() does not add the resulting object into configuration cache.
Definition at line 80 of file obj_ops.c.
M0_INTERNAL void m0_conf_obj_delete | ( | struct m0_conf_obj * | obj | ) |
M0_INTERNAL int m0_conf_obj_fill | ( | struct m0_conf_obj * | dest, |
const struct m0_confx_obj * | src | ||
) |
Enriches a stub with configuration data.
dest | A stub to be filled with configuration data. |
src | On-wire object, providing the configuration data. |
Note, that the caller is responsible for passing valid m0_confx_obj via ‘src’ parameter.
Definition at line 232 of file obj_ops.c.
M0_INTERNAL int m0_conf_obj_find | ( | struct m0_conf_cache * | cache, |
const struct m0_fid * | id, | ||
struct m0_conf_obj ** | out | ||
) |
Finds registered object with given identity or, if no object is found, creates and registers a stub.
Definition at line 136 of file obj_ops.c.
M0_INTERNAL int m0_conf_obj_find_lock | ( | struct m0_conf_cache * | cache, |
const struct m0_fid * | id, | ||
struct m0_conf_obj ** | out | ||
) |
M0_INTERNAL void m0_conf_obj_get | ( | struct m0_conf_obj * | obj | ) |
Increments reference counter of given configuration object.
Definition at line 186 of file obj_ops.c.
M0_INTERNAL void m0_conf_obj_get_lock | ( | struct m0_conf_obj * | obj | ) |
M0_INTERNAL bool m0_conf_obj_invariant | ( | const struct m0_conf_obj * | obj | ) |
M0_INTERNAL bool m0_conf_obj_match | ( | const struct m0_conf_obj * | cached, |
const struct m0_confx_obj * | flat | ||
) |
Returns false iff cached configuration object and on-wire object have conflicting data.
Note, that the caller is responsible for passing valid m0_confx_obj via ‘flat’ parameter.
Definition at line 254 of file obj_ops.c.
M0_INTERNAL void m0_conf_obj_put | ( | struct m0_conf_obj * | obj | ) |
Decrements reference counter of given configuration object.
Broadcasts obj->co_chan if the object becomes unpinned (i.e., if the decremented counter reaches 0).
Definition at line 205 of file obj_ops.c.