Motr  M0
pool_machine.h File Reference
#include "format/format.h"
#include "format/format_xc.h"
#include "lib/tlist.h"
#include "lib/tlist_xc.h"
#include "lib/rwlock.h"
#include "conf/obj.h"
Include dependency graph for pool_machine.h:

Go to the source code of this file.

Data Structures

struct  m0_poolmach_state
 
struct  m0_poolmach
 
struct  m0_poolmach_event
 
struct  m0_poolmach_event_link
 

Macros

#define __MOTR_POOL_MACHINE_H__
 

Enumerations

enum  m0_pool_nd_state {
  M0_PNDS_UNKNOWN, M0_PNDS_ONLINE, M0_PNDS_FAILED, M0_PNDS_OFFLINE,
  M0_PNDS_SNS_REPAIRING, M0_PNDS_SNS_REPAIRED, M0_PNDS_SNS_REBALANCING, M0_PNDS_NR
}
 
enum  { POOL_PM_SPARE_SLOT_UNUSED = 0xFFFFFFFF }
 
enum  m0_poolmach_event_owner_type { M0_POOL_NODE, M0_POOL_DEVICE }
 

Functions

M0_INTERNAL uint32_t m0_poolmach_equeue_length (struct m0_poolmach *pm)
 
M0_INTERNAL int m0_poolmach_init (struct m0_poolmach *pm, struct m0_pool_version *pver, uint32_t nr_nodes, uint32_t nr_devices, uint32_t nr_spare, uint32_t max_node_failures, uint32_t max_device_failures)
 
M0_INTERNAL int m0_poolmach_init_by_conf (struct m0_poolmach *pm, struct m0_conf_pver *pver)
 
M0_INTERNAL void m0_poolmach_fini (struct m0_poolmach *pm)
 
M0_INTERNAL void m0_poolmach_event_queue_apply (struct m0_poolmach *pm)
 
M0_INTERNAL void m0_poolmach_failvec_apply (struct m0_poolmach *pm, const struct m0_ha_nvec *nvec)
 
M0_INTERNAL int m0_poolmach_state_transit (struct m0_poolmach *pm, const struct m0_poolmach_event *event)
 
M0_INTERNAL void m0_poolmach_state_last_cancel (struct m0_poolmach *pm)
 
M0_INTERNAL int m0_poolmach_device_state (struct m0_poolmach *pm, uint32_t device_index, enum m0_pool_nd_state *state_out)
 
M0_INTERNAL int m0_poolmach_node_state (struct m0_poolmach *pm, uint32_t node_index, enum m0_pool_nd_state *state_out)
 
M0_INTERNAL int m0_poolmach_device_node_return (struct m0_poolmach *pm, uint32_t device_index, struct m0_poolnode **node_out)
 
M0_INTERNAL bool m0_poolmach_device_is_in_spare_usage_array (struct m0_poolmach *pm, uint32_t device_index)
 
M0_INTERNAL int m0_poolmach_sns_repair_spare_query (struct m0_poolmach *pm, uint32_t device_index, uint32_t *spare_slot_out)
 
M0_INTERNAL bool m0_poolmach_sns_repair_spare_contains_data (struct m0_poolmach *p, uint32_t spare_slot, bool check_state)
 
M0_INTERNAL int m0_poolmach_sns_rebalance_spare_query (struct m0_poolmach *pm, uint32_t device_index, uint32_t *spare_slot_out)
 
M0_INTERNAL void m0_poolmach_event_dump (const struct m0_poolmach_event *e)
 
M0_INTERNAL void m0_poolmach_event_list_dump (struct m0_poolmach *pm)
 
M0_INTERNAL void m0_poolmach_event_list_dump_locked (struct m0_poolmach *pm)
 
M0_INTERNAL void m0_poolmach_device_state_dump (struct m0_poolmach *pm)
 
M0_INTERNAL uint64_t m0_poolmach_nr_dev_failures (struct m0_poolmach *pm)
 
M0_INTERNAL int m0_poolmach_fid_to_idx (struct m0_poolmach *pm, struct m0_fid *fid, uint32_t *idx)
 
 M0_TL_DESCR_DECLARE (poolmach_events, M0_EXTERN)
 
 M0_TL_DECLARE (poolmach_events, M0_INTERNAL, struct m0_poolmach_event_link)
 
M0_INTERNAL void m0_poolmach_gob2cob (struct m0_poolmach *pm, const struct m0_fid *gfid, uint32_t idx, struct m0_fid *cob_fid)
 
M0_INTERNAL int m0_poolmach_spare_build (struct m0_poolmach *mach, struct m0_pool *pool, enum m0_conf_pver_kind kind)
 

Variables

enum m0_pool_nd_state M0_XCA_ENUM
 

Macro Definition Documentation

◆ __MOTR_POOL_MACHINE_H__

#define __MOTR_POOL_MACHINE_H__

Definition at line 25 of file pool_machine.h.