Motr  M0
Pool Versions Selection Policy.

Data Structures

struct  m0_pver_policy_first_available
 
struct  m0_pver_policy
 
struct  m0_pver_policy_type_ops
 
struct  m0_pver_policy_type
 
struct  m0_pver_policy_ops
 
struct  m0_pver_policies
 

Enumerations

enum  m0_pver_policy_code { M0_PVER_POLICY_FIRST_AVAILABLE, M0_PVER_POLICY_NR }
 

Functions

 M0_TL_DESCR_DEFINE (pver_policy_types, "pver policy type list", static, struct m0_pver_policy_type, ppt_link, ppt_magic, M0_PVER_POLICY_MAGIC, M0_PVER_POLICY_HEAD_MAGIC)
 
 M0_TL_DEFINE (pver_policy_types, static, struct m0_pver_policy_type)
 
static int pver_first_available_create (struct m0_pver_policy **out)
 
static int pver_first_available_init (struct m0_pver_policy *policy)
 
static int pver_first_available_get (struct m0_pools_common *pc, const struct m0_pool *pool, struct m0_pool_version **pver)
 
static void pver_first_available_fini (struct m0_pver_policy *policy)
 
static struct m0_pver_policiespver_policies (void)
 
M0_INTERNAL struct m0_pver_policy_typem0_pver_policy_type_find (enum m0_pver_policy_code code)
 
M0_INTERNAL int m0_pver_policy_types_nr (void)
 
M0_INTERNAL int m0_pver_policy_type_register (struct m0_pver_policy_type *type)
 
M0_INTERNAL void m0_pver_policy_type_deregister (struct m0_pver_policy_type *type)
 
M0_INTERNAL int m0_pver_policies_init (void)
 
M0_INTERNAL void m0_pver_policies_fini (void)
 

Variables

static const struct m0_pver_policy_type_ops first_vailable_pver_policy_type_ops
 
static struct m0_pver_policy_type first_available_pver_policy_type
 
static const struct m0_pver_policy_ops first_available_pver_policy_ops
 
enum m0_pver_policy_code M0_XCA_ENUM
 

Detailed Description

Enumeration Type Documentation

◆ m0_pver_policy_code

Pool version policy codes.

Enumerator
M0_PVER_POLICY_FIRST_AVAILABLE 
M0_PVER_POLICY_NR 

Definition at line 40 of file policy.h.

Function Documentation

◆ m0_pver_policies_fini()

M0_INTERNAL void m0_pver_policies_fini ( void  )

Definition at line 180 of file policy.c.

Here is the call graph for this function:

◆ m0_pver_policies_init()

M0_INTERNAL int m0_pver_policies_init ( void  )

Definition at line 165 of file policy.c.

Here is the call graph for this function:

◆ m0_pver_policy_type_deregister()

M0_INTERNAL void m0_pver_policy_type_deregister ( struct m0_pver_policy_type type)

Unregister pool version policy type.

Definition at line 160 of file policy.c.

Here is the caller graph for this function:

◆ m0_pver_policy_type_find()

M0_INTERNAL struct m0_pver_policy_type * m0_pver_policy_type_find ( enum m0_pver_policy_code  code)

Get pool version policy type.

Definition at line 141 of file policy.c.

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

◆ m0_pver_policy_type_register()

M0_INTERNAL int m0_pver_policy_type_register ( struct m0_pver_policy_type type)

Register pool version policy type.

Definition at line 153 of file policy.c.

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

◆ m0_pver_policy_types_nr()

M0_INTERNAL int m0_pver_policy_types_nr ( void  )

Number of policies registered

Definition at line 147 of file policy.c.

Here is the call graph for this function:

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( pver_policy_types  ,
static  ,
struct m0_pver_policy_type   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( pver_policy_types  ,
"pver policy type list ,
static  ,
struct m0_pver_policy_type  ,
ppt_link  ,
ppt_magic  ,
M0_PVER_POLICY_MAGIC  ,
M0_PVER_POLICY_HEAD_MAGIC   
)

◆ pver_first_available_create()

static int pver_first_available_create ( struct m0_pver_policy **  out)
static

Definition at line 80 of file policy.c.

Here is the call graph for this function:

◆ pver_first_available_fini()

static void pver_first_available_fini ( struct m0_pver_policy policy)
static

Definition at line 99 of file policy.c.

Here is the call graph for this function:

◆ pver_first_available_get()

static int pver_first_available_get ( struct m0_pools_common pc,
const struct m0_pool pool,
struct m0_pool_version **  pver 
)
static

Definition at line 107 of file policy.c.

Here is the call graph for this function:

◆ pver_first_available_init()

static int pver_first_available_init ( struct m0_pver_policy policy)
static

Definition at line 93 of file policy.c.

Here is the call graph for this function:

◆ pver_policies()

static struct m0_pver_policies* pver_policies ( void  )
static

Definition at line 135 of file policy.c.

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

Variable Documentation

◆ first_available_pver_policy_ops

const struct m0_pver_policy_ops first_available_pver_policy_ops
static
Initial value:
= {
}
static int pver_first_available_get(struct m0_pools_common *pc, const struct m0_pool *pool, struct m0_pool_version **pver)
Definition: policy.c:107
static int pver_first_available_init(struct m0_pver_policy *policy)
Definition: policy.c:93
static void pver_first_available_fini(struct m0_pver_policy *policy)
Definition: policy.c:99

Definition at line 74 of file policy.c.

◆ first_available_pver_policy_type

struct m0_pver_policy_type first_available_pver_policy_type
static
Initial value:
= {
.ppt_name = "pver_policy_first_available",
}
static const struct m0_pver_policy_type_ops first_vailable_pver_policy_type_ops
Definition: policy.c:59

Definition at line 68 of file policy.c.

◆ first_vailable_pver_policy_type_ops

const struct m0_pver_policy_type_ops first_vailable_pver_policy_type_ops
static
Initial value:
= {
}
static int pver_first_available_create(struct m0_pver_policy **out)
Definition: policy.c:80

Definition at line 59 of file policy.c.

◆ M0_XCA_ENUM

enum m0_pver_policy_code M0_XCA_ENUM