22 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SSS 132 .sd_name =
"SSS_DFOM_SWITCH",
142 .sd_name =
"SSS_DFOM_DISK_OPENING",
147 .sd_name =
"SSS_DFOM_DISK_HA_STATE_GET",
152 .sd_name =
"SSS_DFOM_DISK_OPENED",
156 .sd_name =
"SSS_DFOM_FS_OPENED",
160 .sd_name =
"SSS_DFOM_SDEV_ITER",
164 .sd_name =
"SSS_DFOM_SDEV_OPENING",
168 .sd_name =
"SSS_DFOM_ATTACH_STOB",
172 .sd_name =
"SSS_DFOM_ATTACH_POOL_MACHINE",
176 .sd_name =
"SSS_DFOM_DETACH_STOB",
180 .sd_name =
"SSS_DFOM_DETACH_STOB_WAIT",
184 .sd_name =
"SSS_DFOM_DETACH_POOL_MACHINE",
188 .sd_name =
"SSS_DFOM_FORMAT",
401 rep->ssdp_ha_state =
obj->co_ha_state;
560 M0_CONF_ROOT_NODES_FID,
561 M0_CONF_NODE_PROCESSES_FID,
562 M0_CONF_PROCESS_SERVICES_FID,
563 M0_CONF_SERVICE_SDEVS_FID);
832 if (
rep->ssdp_rc != 0)
887 #undef M0_TRACE_SUBSYSTEM
const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
M0_INTERNAL int m0_ha_state_get(struct m0_ha_nvec *note, struct m0_chan *chan)
M0_INTERNAL struct m0_storage_dev * m0_storage_devs_find_by_cid(struct m0_storage_devs *devs, uint64_t cid)
static int sss_device_fom_conf_obj_open(struct m0_sss_dfom *dfom, struct m0_fid *fid)
static void sss_device_fom_ha_init(struct m0_sss_dfom *dfom, struct m0_fid *fid)
void m0_fom_phase_moveif(struct m0_fom *fom, int32_t rc, int phase0, int phase1)
struct m0_fop_type m0_sss_fop_device_rep_fopt
struct m0_conf_obj * cc_root
M0_INTERNAL void m0_fom_wakeup(struct m0_fom *fom)
M0_INTERNAL struct m0_reqh_service * m0_reqh_service_lookup(const struct m0_reqh *reqh, const struct m0_fid *fid)
static int sss_device_fom_root_info_use(struct m0_sss_dfom *dfom, struct m0_conf_obj **root_obj)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static int sss_device_fom_sdev_opening(struct m0_fom *fom)
M0_INTERNAL void m0_fom_block_enter(struct m0_fom *fom)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
M0_INTERNAL void m0_clink_del(struct m0_clink *link)
static int sss_device_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
static int sss_device_fom_fs_opened(struct m0_fom *fom)
M0_INTERNAL struct m0_conf_obj * m0_confc_ctx_result(struct m0_confc_ctx *ctx)
M0_INTERNAL void m0_storage_dev_attach(struct m0_storage_dev *dev, struct m0_storage_devs *devs)
int(* fo_tick)(struct m0_fom *fom)
#define M0_LOG(level,...)
static bool sss_device_fom_conf_obj_ha_state_cb(struct m0_clink *link)
struct m0_sss_dfom::@504 ssm_ha
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
struct m0_conf_obj * fc_result
const struct m0_conf_obj_type M0_CONF_SDEV_TYPE
static int sss_device_stob_attach(struct m0_fom *fom)
static void sss_device_fom_fini(struct m0_fom *fom)
M0_INTERNAL int32_t m0_confc_ctx_error_lock(const struct m0_confc_ctx *ctx)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
M0_INTERNAL void m0_chan_lock(struct m0_chan *ch)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_confc_open_by_fid(struct m0_confc_ctx *ctx, const struct m0_fid *fid)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
static int sss_device_stob_detach(struct m0_fom *fom, bool arm_wakeup)
static int sss_device_format(struct m0_fom *fom)
struct m0_fop_getxattr_rep * rep
M0_INTERNAL struct m0_sss_device_fop * m0_sss_fop_to_dev_req(struct m0_fop *fop)
#define m0_confc_open(ctx, origin,...)
struct m0_fom_type ft_fom_type
static int sss_device_fom_disk_opening(struct m0_fom *fom)
static void sss_device_fom_switch(struct m0_fom *fom)
enum sss_device_fom_stage ssm_stage
M0_INTERNAL bool m0_sss_fop_is_dev_req(const struct m0_fop *fop)
M0_INTERNAL int m0_storage_dev_new_by_conf(struct m0_storage_devs *devs, struct m0_conf_sdev *sdev, bool force, struct m0_storage_dev **dev)
static struct m0_fom_ops sss_device_fom_ops
void m0_fom_init(struct m0_fom *fom, const struct m0_fom_type *fom_type, const struct m0_fom_ops *ops, struct m0_fop *fop, struct m0_fop *reply, struct m0_reqh *reqh)
struct m0_fop_type * f_type
struct m0_clink ssm_clink
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
const struct m0_sm_conf sss_device_fom_conf
M0_INTERNAL void m0_confc_ctx_fini(struct m0_confc_ctx *ctx)
M0_INTERNAL void m0_storage_devs_lock(struct m0_storage_devs *devs)
int m0_fom_tick_generic(struct m0_fom *fom)
void m0_fom_fini(struct m0_fom *fom)
struct m0_sm_state_descr sss_device_fom_phases_desc[]
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
static struct m0_confc * confc
const struct m0_fom_type_ops sss_device_fom_type_ops
static bool sss_device_find_has_svc(struct m0_fom *fom, struct m0_fid *svc_fid)
struct m0_conf_obj * m0_conf_obj_grandparent(const struct m0_conf_obj *obj)
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
M0_INTERNAL bool m0_confc_ctx_is_completed(const struct m0_confc_ctx *ctx)
struct m0_reqh_service_type m0_ios_type
static int sss_disk_info_use(struct m0_sss_dfom *dfom)
M0_INTERNAL void m0_fom_block_leave(struct m0_fom *fom)
M0_INTERNAL int m0_confc_ctx_init(struct m0_confc_ctx *ctx, struct m0_confc *confc)
static int sss_device_fom_disk_ha_state_get(struct m0_fom *fom)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL int m0_conf_diter_next(struct m0_conf_diter *it, bool(*filter)(const struct m0_conf_obj *obj))
static int sss_device_fom_sdev_iter(struct m0_fom *fom)
#define M0_CONF_CAST(ptr, type)
struct m0_conf_sdev * ck_sdev
static struct m0_clink clink[RDWR_REQUEST_MAX]
struct m0_mutex chan_lock
M0_INTERNAL struct m0_storage_devs * m0_cs_storage_devs_get(void)
M0_INTERNAL int m0_storage_dev_format(struct m0_storage_dev *dev, uint64_t cid)
static int sss_device_fom_sdev_iter_init(struct m0_sss_dfom *dfom, struct m0_conf_obj *root_obj)
M0_INTERNAL void m0_chan_unlock(struct m0_chan *ch)
struct m0_fop * m0_fop_reply_alloc(struct m0_fop *req, struct m0_fop_type *rept)
static uint32_t sss_dfom_device_cmd(struct m0_sss_dfom *dfom)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
M0_INTERNAL struct m0_conf_obj * m0_conf_diter_result(const struct m0_conf_diter *it)
#define m0_conf_diter_init(iter, confc, origin,...)
M0_INTERNAL struct m0_sss_device_fop_rep * m0_sss_fop_to_dev_rep(struct m0_fop *fop)
static int sss_device_fom_tick(struct m0_fom *fom)
static bool _obj_is_sdev(const struct m0_conf_obj *obj)
M0_INTERNAL void m0_storage_dev_detach(struct m0_storage_dev *dev)
#define M0_FI_ENABLED(tag)
static bool sss_device_fom_sdev_iter_cb(struct m0_clink *clink)
static int sss_confc_ctx_init(struct m0_sss_dfom *dfom)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL int m0_pool_device_state_update(struct m0_reqh *reqh, struct m0_be_tx *tx, struct m0_fid *dev_fid, enum m0_pool_nd_state new_state)
M0_INTERNAL void m0_conf_diter_fini(struct m0_conf_diter *it)
static struct m0_net_test_service svc
static size_t sss_device_fom_home_locality(const struct m0_fom *fom)
struct m0_conf_obj sd_obj
static void sss_device_fom_ha_fini(struct m0_sss_dfom *dfom)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
static struct m0_fop * fop
struct m0_chan isd_detached_chan
M0_INTERNAL void m0_storage_devs_unlock(struct m0_storage_devs *devs)
M0_INTERNAL void m0_confc_close(struct m0_conf_obj *obj)
M0_INTERNAL void m0_chan_fini(struct m0_chan *chan)
struct m0_fop * fo_rep_fop
struct m0_confc_ctx ssm_confc_ctx
static int sss_device_pool_machine_detach(struct m0_fom *fom)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
static int sss_device_pool_machine_attach(struct m0_fom *fom)
struct m0_ha_note * nv_note
M0_INTERNAL void m0_ha_state_accept(const struct m0_ha_nvec *note, bool ignore_same_state)
static int sss_device_fom_disk_opened(struct m0_fom *fom)
static bool sss_dfom_confc_ctx_check_cb(struct m0_clink *clink)
static void sss_device_fom_ha_update(struct m0_sss_dfom *dfom)
struct m0_conf_diter ssm_it
struct m0_conf_obj ck_obj
M0_INTERNAL struct m0_reqh * m0_fom_reqh(const struct m0_fom *fom)
#define M0_IMPOSSIBLE(fmt,...)