Motr
M0
|
#include <rm.h>
Data Fields | |
const struct m0_rm_resource_type_ops * | rt_ops |
const char * | rt_name |
uint64_t | rt_id |
struct m0_mutex | rt_lock |
struct m0_tl | rt_resources |
uint32_t | rt_nr_resources |
struct m0_sm_group | rt_sm_grp |
struct m0_thread | rt_worker |
bool | rt_stop_worker |
struct m0_rm_domain * | rt_dom |
struct m0_mutex | rt_queue_guard |
struct m0_queue | rt_ha_events |
Resources are classified into disjoint types. Resource type determines how its instances interact with the resource management generic core and defines:
struct m0_rm_domain* rt_dom |
struct m0_queue rt_ha_events |
Incoming events associated with remote RM owner are enqueued in this event queue. The queue is protected by rt_queue_guard, and relevant handling of the events is done by the AST thread.
uint64_t rt_id |
A resource type identifier, globally unique within a cluster, used to identify resource types on wire and storage.
This identifier is used as an index in m0_rm_domain::rd_types.
uint32_t rt_nr_resources |
Active references to this resource type from resource instances (m0_rm_owner::ro_resource). Protected by m0_rm_resource_type::rt_lock.
const struct m0_rm_resource_type_ops* rt_ops |
struct m0_tl rt_resources |
List of all resources of this type. Protected by m0_rm_resource_type::rt_lock.
struct m0_sm_group rt_sm_grp |