23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_HA 53 return msg->
hm_data.
u.hed_fvec_rep.mfp_nr;
60 &msg->
hm_data.
u.hed_fvec_req.mfq_cookie :
61 &msg->
hm_data.
u.hed_fvec_rep.mfp_cookie;
66 return msg->
hm_data.
u.hed_fvec_rep.mfp_vec.hmna_arr;
68 static const struct m0_fid*
71 return &msg->
hm_data.
u.hed_fvec_req.mfq_pool;
136 const struct m0_fid *pool_fid,
149 if (fvec_req ==
NULL)
150 return M0_ERR_INFO(-ENOMEM,
"No sufficient memory to" 151 "create a failvec fetch request");
155 .fhr_fid = *pool_fid,
156 .fhr_pmach = pool_mach,
160 ha_fvreq_tlink_init_at_tail(fvec_req, &hfh->
hfh_fvreq);
178 ha_fvreq_tlink_del_fini(fhr);
222 pool_fid, pmach,
chan, &req_cookie);
240 note = msg->
hm_data.
u.hed_fvec_rep.mfp_vec.hmna_arr;
253 const struct m0_fid *pool_fid,
260 uint32_t note_nr = 0;
264 note = msg->
hm_data.
u.hed_fvec_rep.mfp_vec.hmna_arr;
269 note[note_nr].
no_state = pd->pd_state;
272 msg->
hm_data.
u.hed_fvec_rep.mfp_nr = note_nr;
292 msg->
hm_data.
u.hed_fvec_req.mfq_pool = *pool_fid;
293 msg->
hm_data.
u.hed_fvec_req.mfq_cookie = *cookie;
295 msg->
hm_data.
u.hed_fvec_rep.mfp_pool = *pool_fid;
296 msg->
hm_data.
u.hed_fvec_rep.mfp_cookie = *cookie;
319 #undef M0_TRACE_SUBSYSTEM
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
struct m0_pool_version * pm_pver
static uint64_t tag(uint8_t code, uint64_t id)
#define M0_LOG(level,...)
static uint32_t fvec_msg_type(const struct m0_ha_msg *msg)
struct m0_ha_msg_data hm_data
struct m0_ha_fvec_handler * i_fvec_handler
M0_INTERNAL struct m0 * m0_get(void)
static const struct m0_ha_note * fvec_rep_msg_to_note(const struct m0_ha_msg *msg)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL int m0_ha_failvec_fetch(const struct m0_fid *pool_fid, struct m0_poolmach *pmach, struct m0_chan *chan)
M0_INTERNAL void m0_ha_link_send(struct m0_ha_link *hl, const struct m0_ha_msg *msg, uint64_t *tag)
static uint32_t fvec_rep_msg_vec_len(const struct m0_ha_msg *msg)
#define M0_ERR_INFO(rc, fmt,...)
return M0_ERR(-EOPNOTSUPP)
static void ha_fvec_handler_msg(struct m0_ha_handler *hh, struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag, void *data)
struct m0_chan * fhr_chan
struct m0_ha_link_cfg hln_cfg
M0_INTERNAL uint64_t m0_rnd(uint64_t max, uint64_t *seed)
#define M0_FID_TINIT(type, container, key)
struct m0_ha_dispatcher * hfh_dispatcher
static const struct m0_fid * fvec_msg_to_pool(const struct m0_ha_msg *msg)
m0_time_t m0_time_now(void)
struct m0_poolmach * fhr_pmach
M0_INTERNAL void m0_poolmach_failvec_apply(struct m0_poolmach *pm, const struct m0_ha_nvec *nvec)
static void ha_msg_fvec_build(struct m0_ha_msg *msg, const struct m0_fid *pool_fid, struct m0_ha_link *hl)
M0_TL_DEFINE(ha_fvreq, static, struct ha_fvec_handler_request)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
#define m0_cookie_of(cookie, type, field)
M0_INTERNAL void m0_cookie_init(struct m0_cookie *cookie, const uint64_t *obj)
M0_INTERNAL int m0_ha_msg_fvec_send(const struct m0_fid *pool_fid, const struct m0_cookie *cookie, struct m0_ha_link *hl, uint32_t type)
M0_INTERNAL void m0_ha_dispatcher_attach(struct m0_ha_dispatcher *hd, struct m0_ha_handler *hh)
M0_INTERNAL void m0_ha_fvec_req_handler(struct m0_ha_fvec_handler *hfh, const struct m0_ha_msg *msg, struct m0_ha_link *hl)
M0_INTERNAL void m0_chan_signal_lock(struct m0_chan *chan)
static struct m0_pool pool
struct m0_tlink fhr_tlink
union m0_ha_msg_data::@212 u
M0_INTERNAL void m0_ha_dispatcher_detach(struct m0_ha_dispatcher *hd, struct m0_ha_handler *hh)
struct m0_reqh * hlc_reqh
static struct m0_chan chan[RDWR_REQUEST_MAX]
#define M0_FI_ENABLED(tag)
M0_INTERNAL struct m0_pool * m0_pool_find(struct m0_pools_common *pc, const struct m0_fid *pool)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_cookie_new(uint64_t *gen)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
struct m0_pools_common * rh_pools
M0_TL_DESCR_DEFINE(ha_fvreq, "failure-vec-req", static, struct ha_fvec_handler_request, fhr_tlink, fhr_magic, 20, 21)
struct m0_ha_handler hfh_handler
M0_INTERNAL int m0_ha_fvec_handler_add(struct m0_ha_fvec_handler *hfh, const struct m0_fid *pool_fid, struct m0_poolmach *pool_mach, struct m0_chan *chan, struct m0_cookie *cookie)
M0_INTERNAL int m0_ha_fvec_handler_init(struct m0_ha_fvec_handler *hfh, struct m0_ha_dispatcher *hd)
struct m0_ha_note * nv_note
#define m0_tl_for(name, head, obj)
static struct m0_sm_state_descr states[C_NR]
static void ha_ut_fvec_reply_populate(struct m0_ha_msg *msg)
M0_INTERNAL void m0_ha_fvec_rep_handler(struct m0_ha_fvec_handler *hfh, const struct m0_ha_msg *msg)
M0_INTERNAL void m0_ha_fvec_handler_fini(struct m0_ha_fvec_handler *hfh)
static const struct m0_cookie * fvec_msg_cookie_get(const struct m0_ha_msg *msg)
struct m0_tl po_failed_devices