23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_FOP 40 #include "fop/fom_generic_xc.h" 61 .
name =
"generic-reply",
63 .
xt = m0_fop_generic_reply_xc,
72 rep->fmr_remid.tri_locality =
fom->fo_loc_idx;
251 uint64_t phase_sm_id;
255 &
fom->fo_loc->fl_group);
274 if (!
fom->fo_local) {
327 fom->fo_rep_fop = rfop;
423 "m0_fom_fol_rec_add() failed: rc=%d",
rc);
471 if (!
fom->fo_local) {
522 M0_ENTRY(
"fom=%p req=%p reply=%p local=%d",
524 if (!
fom->fo_local) {
582 "local_resource_wait",
590 "dist_resource_wait",
657 .sd_name =
"authen_wait",
661 .sd_name =
"local_resource",
667 .sd_name =
"local_resource_wait",
672 .sd_name =
"dist_resource",
678 .sd_name =
"dist_resource_wait",
682 .sd_name =
"obj_check",
688 .sd_name =
"obj_check_wait",
698 .sd_name =
"auth_wait",
702 .sd_name =
"tx_init",
706 .sd_name =
"tx_open",
710 .sd_name =
"tx_wait",
715 .sd_name =
"success",
719 .sd_name =
"fol_rec_add",
723 .sd_name =
"tx_commit",
727 .sd_name =
"queue_reply",
733 .sd_name =
"queue_reply_wait",
738 .sd_name =
"tx_logged_wait",
742 .sd_name =
"tx_done_wait",
746 .sd_name =
"timeout",
751 .sd_name =
"failure",
759 .sd_name =
"specific-phase",
771 {
"wait-authentication",
773 {
"authentication-finished",
776 {
"authentication-wait-complete",
778 {
"authentication-wait-failed",
780 {
"local-resource-wait",
782 {
"local-resourc-complete",
784 {
"local-resource-failed",
786 {
"local-resource-wait-complete",
788 {
"local-resource-wait-failed",
790 {
"distributed-resource-wait",
792 {
"distributed-resource-complete",
794 {
"distributed-resource-failed",
796 {
"distributed-resource-wait-complete",
798 {
"distributed-resource-wait-failed",
803 {
"object-wait-complete",
806 {
"authorisation-wait",
810 {
"authorisation-wait-complete",
812 {
"authorisation-wait-failed",
825 {
"reply-wait-finished",
840 .scf_name =
"standard-phases",
879 #undef M0_TRACE_SUBSYSTEM
static bool fom_is_update(const struct m0_fom *fom)
M0_INTERNAL bool m0_dtm0_is_a_volatile_dtm(struct m0_reqh_service *service)
const struct m0_xcode_type * xf_type
static int fom_obj_check_wait(struct m0_fom *fom)
static int fom_timeout(struct m0_fom *fom)
bool m0_rpc_item_is_generic_reply_fop(const struct m0_rpc_item *item)
#define M0_FOP_TYPE_INIT(ft,...)
M0_INTERNAL void m0_fom_generic_fini(void)
#define M0_LOG(level,...)
const struct m0_xcode_type * ft_xt
M0_INTERNAL void m0_dtx_init(struct m0_dtx *tx, struct m0_be_domain *be_domain, struct m0_sm_group *sm_group)
const struct m0_be_tx_credit m0_be_tx_credit_invalid
M0_INTERNAL void m0_dtx_opened(struct m0_dtx *tx)
static int fom_failure(struct m0_fom *fom)
void * m0_fop_data(const struct m0_fop *fop)
static int fom_loc_resource(struct m0_fom *fom)
void m0_fop_type_fini(struct m0_fop_type *fopt)
struct m0_xcode_field xct_child[0]
M0_INTERNAL void m0_be_tx_prep(struct m0_be_tx *tx, const struct m0_be_tx_credit *credit)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
static struct m0_xcode_type ** xt[]
M0_ADDB2_ADD(M0_AVI_FS_CREATE, new_fid.f_container, new_fid.f_key, mode, rc)
static int fom_auth(struct m0_fom *fom)
const struct m0_sm_conf m0_generic_conf
static struct m0_rpc_item * item
struct m0_fop_getxattr_rep * rep
static struct m0_be_tx * m0_fom_tx(struct m0_fom *fom)
static int fom_queue_reply(struct m0_fom *fom)
static int fom_success(struct m0_fom *fom)
static int fom_fol_rec_add(struct m0_fom *fom)
int32_t m0_rpc_item_generic_reply_rc(const struct m0_rpc_item *reply)
struct m0_fop_type * f_type
static int fom_authen_wait(struct m0_fom *fom)
M0_INTERNAL int m0_fop_fol_add(struct m0_fop *fop, struct m0_fop *rep, struct m0_dtx *dtx)
M0_INTERNAL void m0_dtx_open(struct m0_dtx *tx)
int m0_fom_tick_generic(struct m0_fom *fom)
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
static struct m0_fop reply_fop
M0_INTERNAL void m0_fom_fdmi_record_post(struct m0_fom *fom)
static int fom_tx_commit(struct m0_fom *fom)
M0_INTERNAL void m0_fom_mod_rep_fill(struct m0_fop_mod_rep *rep, struct m0_fom *fom)
const struct m0_rpc_item_type * ri_type
M0_INTERNAL int m0_fom_tx_done_wait(struct m0_fom *fom)
M0_INTERNAL int m0_fom_generic_init(void)
M0_INTERNAL void m0_dtx_fini(struct m0_dtx *tx)
int(* fpd_action)(struct m0_fom *fom)
M0_INTERNAL bool m0_rpc_item_is_update(const struct m0_rpc_item *item)
static int fom_tx_open(struct m0_fom *fom)
void m0_rpc_reply_post(struct m0_rpc_item *request, struct m0_rpc_item *reply)
static int fom_phase_init(struct m0_fom *fom)
static int fom_dist_resource(struct m0_fom *fom)
M0_INTERNAL void m0_be_tx_get(struct m0_be_tx *tx)
M0_INTERNAL void m0_dtx_done(struct m0_dtx *tx)
struct m0_fop_type m0_fop_generic_reply_fopt
struct m0_fop * m0_fop_reply_alloc(struct m0_fop *req, struct m0_fop_type *rept)
static int fom_loc_resource_wait(struct m0_fom *fom)
static int fom_auth_wait(struct m0_fom *fom)
const struct m0_xcode_type M0_XT_U32
static void generic_reply_build(struct m0_fom *fom)
M0_BASSERT(ARRAY_SIZE(m0_generic_phases_trans)==M0_FOM_GENERIC_TRANS_NR)
static int fom_authen(struct m0_fom *fom)
static int fom_tx_wait(struct m0_fom *fom)
M0_INTERNAL void m0_be_tx_open(struct m0_be_tx *tx)
M0_INTERNAL int m0_fom_rc(const struct m0_fom *fom)
struct m0_rpc_item * m0_fop_to_rpc_item(const struct m0_fop *fop)
struct m0_sm_trans_descr m0_generic_phases_trans[]
enum m0_dtx_state tx_state
static struct m0_sm_state_descr generic_phases[]
static int fom_queue_reply_wait(struct m0_fom *fom)
struct m0_rpc_item_type ft_rpc_item_type
M0_INTERNAL void m0_be_tx_put(struct m0_be_tx *tx)
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
static int fom_tx_init(struct m0_fom *fom)
static const struct fom_phase_desc fpd_table[]
M0_INTERNAL int m0_fom_fol_rec_add(struct m0_fom *fom)
#define M0_ASSERT_INFO(cond, fmt,...)
static int fom_dist_resource_wait(struct m0_fom *fom)
M0_INTERNAL int m0_fom_tx_logged_wait(struct m0_fom *fom)
M0_INTERNAL void m0_be_tx_payload_prep(struct m0_be_tx *tx, m0_bcount_t size)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
static struct m0_dtm_oper_descr reply
M0_INTERNAL uint64_t m0_sm_id_get(const struct m0_sm *sm)
static int fom_obj_check(struct m0_fom *fom)
M0_INTERNAL struct m0_reqh * m0_fom_reqh(const struct m0_fom *fom)
M0_INTERNAL const char * m0_fom_phase_name(const struct m0_fom *fom, int phase)