Motr
M0
|
Data Structures | |
struct | m0_rpc_conn |
struct | m0_rpc_conn_ha_ops |
struct | m0_rpc_conn_ha_cfg |
struct | fop_session_establish_ctx |
struct | m0_rpc_session |
struct | m0_rpc_connection_session_specific_fom |
struct | m0_rpc_fop_conn_establish_ctx |
struct | m0_rpc_fop_conn_establish |
struct | m0_rpc_fop_conn_establish_rep |
struct | m0_rpc_fop_conn_terminate |
struct | m0_rpc_fop_conn_terminate_rep |
struct | m0_rpc_fop_session_establish |
struct | m0_rpc_fop_session_establish_rep |
struct | m0_rpc_fop_session_terminate |
struct | m0_rpc_fop_session_terminate_rep |
Macros | |
#define | S_CASE(x) case x: return #x; |
Session module of rpc layer has two objectives:
Aproach taken by session module to achive these two objectives, is similar to session-slot implementation in NFSv4.1
See section 2.10.6 of rfc 5661 NFSv4.1 http://tools.ietf.org/html/rfc5661#section-2.10.6
Session module defines following types of objects:
Session module uses following types of objects:
Rpc connection has a list of rpc sessions, which are created on this connection. A rpc connection cannot be terminated until all the sessions created on the connection are terminated.
Each object of type [m0_rpc_conn|m0_rpc_session] on sender has counterpart object of same type on receiver. (Note: same structure definitions are used on both sender and receiver side)
Using two identifiers for session and conn
This file implements functions related to m0_rpc_conn.
This file defines functions related to m0_rpc_session.
Definitions of foms that execute conn establish, conn terminate, session establish and session terminate fops.
This file contains, fom declarations for [conn|session]_[establish|terminate].
This file contains definitions of fop types and rpc item types, of fops belonging to rpc-session module
Declarations of all the fops belonging to rpc-session module along with associated item types.
anonymous enum |
anonymous enum |
Enumerator | |
---|---|
SENDER_ID_INVALID |
Definition at line 41 of file conn_internal.h.
anonymous enum |
Enumerator | |
---|---|
SESSION_ID_0 | [conn|session]_[create|terminate] items go on session 0 |
SESSION_ID_INVALID | |
SESSION_ID_MIN | Range of valid session ids |
SESSION_ID_MAX |
Definition at line 39 of file session_internal.h.
enum m0_rpc_conn_flags |
RPC Connection flags
Enumerator | |
---|---|
RCF_SENDER_END | |
RCF_RECV_END | |
RCF_TRANSIENT_SENT | M0_NC_TRANSIENT state has been already sent to HA. |
Enumerator | |
---|---|
M0_RPC_CONN_SESS_TERMINATE_INIT | |
M0_RPC_CONN_SESS_TERMINATE_DONE | |
M0_RPC_CONN_SESS_TERMINATE_WAIT |
Definition at line 44 of file session_fops.h.
enum m0_rpc_conn_state |
Enumerator | |
---|---|
M0_RPC_CONN_INITIALISED | All the fields of conn are initialised locally. But the connection is not yet established. |
M0_RPC_CONN_CONNECTING | Connection establish request is sent to receiver but its reply is not yet received. |
M0_RPC_CONN_ACTIVE | Receiver replied with a successful connection establish reply. Connection is established and ready to be used. |
M0_RPC_CONN_FAILED | If conn init or terminate fails or time-outs connection enters in FAILED state. m0_rpc_conn::c_sm::sm_rc contains reason for failure. |
M0_RPC_CONN_TERMINATING | When sender calls m0_rpc_conn_terminate() on m0_rpc_conn object a FOP is sent to the receiver side to terminate the rpc connection. Until reply is received, m0_rpc_conn object stays in TERMINATING state |
M0_RPC_CONN_TERMINATED | When sender receives reply for conn_terminate FOP and reply FOP specifies the conn_terminate operation is successful then the object of m0_rpc_conn enters in TERMINATED state |
M0_RPC_CONN_FINALISED | After m0_rpc_conn_fini() the RPC connection instance is moved to FINALISED state. |
Enumerator | |
---|---|
M0_FOPH_CONN_ESTABLISHING |
Definition at line 47 of file session_foms.h.
Enumerator | |
---|---|
M0_FOPH_CONN_TERMINATING |
Definition at line 91 of file session_foms.h.
Enumerator | |
---|---|
M0_FOPH_SESSION_ESTABLISHING |
Definition at line 63 of file session_foms.h.
Enumerator | |
---|---|
M0_FOPH_SESSION_TERMINATING |
Definition at line 77 of file session_foms.h.
enum m0_rpc_session_state |
Possible states of a session object
Enumerator | |
---|---|
M0_RPC_SESSION_INITIALISED | all lists, mutex and channels of session are initialised. No actual session is established with any end point |
M0_RPC_SESSION_ESTABLISHING | When sender sends a SESSION_ESTABLISH FOP to reciever it is in ESTABLISHING state |
M0_RPC_SESSION_IDLE | A session can be terminated only if it is IDLE. |
M0_RPC_SESSION_BUSY | A session is busy if any of following is true
|
M0_RPC_SESSION_FAILED | Creation/termination of session failed |
M0_RPC_SESSION_TERMINATING | When sender sends SESSION_TERMINATE fop to receiver and is waiting for reply, then it is in state TERMINATING. |
M0_RPC_SESSION_TERMINATED | When sender gets reply to session_terminate fop and reply informs the session termination is successful then the session enters in TERMINATED state |
M0_RPC_SESSION_FINALISED | After m0_rpc_session_fini() the RPC session instance is moved to FINALISED state. |
|
static |
Common code in m0_rpc_conn_fini() and init failed case in __conn_init()
Definition at line 500 of file conn.c.
|
static |
|
static |
|
static |
|
static |
Finalises session. Used by m0_rpc_session_init(), when initialisation fails. m0_rpc_session_fini() for cleanup
Definition at line 283 of file session.c.
|
static |
Definition at line 558 of file session_foms.c.
|
static |
Definition at line 65 of file session_fops.c.
|
static |
No need to allocate fop->f_data.fd_data since xcode allocates top level object also.
Definition at line 81 of file session_fops.c.
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
M0_INTERNAL void conn_state_set | ( | struct m0_rpc_conn * | conn, |
int | state | ||
) |
|
static |
|
static |
M0_INTERNAL int m0_rpc__fop_post | ( | struct m0_fop * | fop, |
struct m0_rpc_session * | session, | ||
const struct m0_rpc_item_ops * | ops, | ||
m0_time_t | abs_timeout | ||
) |
Initialises rpc item and posts it to rpc-layer
Definition at line 62 of file session_utils.c.
M0_INTERNAL int m0_rpc__post_locked | ( | struct m0_rpc_item * | item | ) |
M0_INTERNAL struct m0_conf_obj * m0_rpc_conn2svc | ( | const struct m0_rpc_conn * | conn | ) |
M0_INTERNAL void m0_rpc_conn_add_session | ( | struct m0_rpc_conn * | conn, |
struct m0_rpc_session * | session | ||
) |
M0_INTERNAL const char * m0_rpc_conn_addr | ( | const struct m0_rpc_conn * | conn | ) |
M0_INTERNAL void m0_rpc_conn_cleanup_all_sessions | ( | struct m0_rpc_conn * | conn | ) |
M0_INTERNAL int m0_rpc_conn_create | ( | struct m0_rpc_conn * | conn, |
struct m0_fid * | svc_fid, | ||
struct m0_net_end_point * | ep, | ||
struct m0_rpc_machine * | rpc_machine, | ||
uint64_t | max_rpcs_in_flight, | ||
m0_time_t | abs_timeout | ||
) |
A combination of m0_rpc_conn_init() and m0_rpc_conn_establish_sync() in a single routine - initialize connection object, establish a connection and wait until it become active.
Conf object svc_obj is allowed to be NULL in case HA notification monitoring is not required on the established connection. Otherwise it should be from confc instance ultimately added to HA clients list to let HA notifications be handled proper way.
Definition at line 809 of file conn.c.
int m0_rpc_conn_destroy | ( | struct m0_rpc_conn * | conn, |
m0_time_t | abs_timeout | ||
) |
A combination of m0_rpc_conn_terminate_sync() and m0_rpc_conn_fini() in a single routine - terminate the connection, wait until it switched to terminated state and finalize connection object.
Definition at line 974 of file conn.c.
M0_INTERNAL int m0_rpc_conn_establish | ( | struct m0_rpc_conn * | conn, |
m0_time_t | abs_timeout | ||
) |
Sends handshake CONN_ESTABLISH fop to the remote end.
Use m0_rpc_conn_timedwait() to wait until conn moves to ESTABLISHED or FAILED state.
Definition at line 857 of file conn.c.
M0_INTERNAL void m0_rpc_conn_establish_reply_received | ( | struct m0_rpc_item * | req | ) |
M0_INTERNAL int m0_rpc_conn_establish_sync | ( | struct m0_rpc_conn * | conn, |
m0_time_t | abs_timeout | ||
) |
Same as m0_rpc_conn_establish(), but in addition uses m0_rpc_conn_timedwait() to ensure that connection is in active state after m0_rpc_conn_establish() call.
conn | A connection object to operate on. |
abs_timeout | Absolute timeout after which connection establishing is given up and conn is moved to FAILED state. |
Definition at line 836 of file conn.c.
M0_INTERNAL void m0_rpc_conn_fini | ( | struct m0_rpc_conn * | conn | ) |
Finalises m0_rpc_conn. No network communication involved.
Definition at line 558 of file conn.c.
M0_INTERNAL void m0_rpc_conn_fini_locked | ( | struct m0_rpc_conn * | conn | ) |
M0_INTERNAL void m0_rpc_conn_ha_cfg_set | ( | struct m0_rpc_conn * | conn, |
const struct m0_rpc_conn_ha_cfg * | cfg | ||
) |
M0_INTERNAL int m0_rpc_conn_ha_subscribe | ( | struct m0_rpc_conn * | conn, |
struct m0_fid * | svc_fid | ||
) |
Late binding to service object. To be used with rpc connection possibly established to the moment, but originally not subscribed to HA notifications.
Definition at line 585 of file conn.c.
M0_INTERNAL int m0_rpc_conn_ha_timer_start | ( | struct m0_rpc_conn * | conn | ) |
M0_INTERNAL void m0_rpc_conn_ha_timer_stop | ( | struct m0_rpc_conn * | conn | ) |
M0_INTERNAL void m0_rpc_conn_ha_unsubscribe | ( | struct m0_rpc_conn * | conn | ) |
M0_INTERNAL int m0_rpc_conn_init | ( | struct m0_rpc_conn * | conn, |
struct m0_fid * | svc_obj, | ||
struct m0_net_end_point * | ep, | ||
struct m0_rpc_machine * | machine, | ||
uint64_t | max_rpcs_in_flight | ||
) |
Initialises object and associates it with . No network communication is involved.
Service fid can be provided to the call as an option. In case svc_fid is not NULL, connection gets subscribed to HA notifications on the object. Death notification under the circumstances is to result in cancelling all rpc items registered with the connection and still remaining unsent unless protection is set up on item explicitly by client with m0_rpc_item_ha_autocancel_set().
Note: m0_rpc_conn_init() can fail with -ENOMEM, -EINVAL. if m0_rpc_conn_init() fails, conn is left in undefined state.
Definition at line 293 of file conn.c.
M0_INTERNAL bool m0_rpc_conn_invariant | ( | const struct m0_rpc_conn * | conn | ) |
M0_INTERNAL bool m0_rpc_conn_is_known_dead | ( | const struct m0_rpc_conn * | conn | ) |
Tests connection object for remote service being known dead to the moment, i.e. having related conf service object bearing M0_NC_FAILED state. In case no HA subsctiption exists on the connection, reports the assertion false.
Definition at line 1311 of file conn.c.
M0_INTERNAL bool m0_rpc_conn_is_rcv | ( | const struct m0_rpc_conn * | conn | ) |
M0_INTERNAL bool m0_rpc_conn_is_snd | ( | const struct m0_rpc_conn * | conn | ) |
M0_INTERNAL void m0_rpc_conn_remove_session | ( | struct m0_rpc_session * | session | ) |
M0_INTERNAL void m0_rpc_conn_reset | ( | struct m0_rpc_conn * | conn | ) |
M0_INTERNAL struct m0_rpc_session* m0_rpc_conn_session0 | ( | const struct m0_rpc_conn * | conn | ) |
Searches and returns session with session id 0. Note: Every rpc connection always has exactly one active session with session id 0.
Searches and returns session with session_id 0. Each rpc connection always has exactly one instance of session with SESSION_ID_0 in its c_sessions list.
Definition at line 749 of file conn.c.
M0_INTERNAL int m0_rpc_conn_session_list_dump | ( | const struct m0_rpc_conn * | conn | ) |
M0_INTERNAL void m0_rpc_conn_sessions_cancel | ( | struct m0_rpc_conn * | conn | ) |
Walks through all sessions on the connection and cancels rpc items placed onto session request cache.
Definition at line 1324 of file conn.c.
M0_INTERNAL const char * m0_rpc_conn_state_to_str | ( | enum m0_rpc_conn_state | state | ) |
M0_INTERNAL int m0_rpc_conn_terminate | ( | struct m0_rpc_conn * | conn, |
m0_time_t | abs_timeout | ||
) |
Sends "conn_terminate" FOP to receiver. m0_rpc_conn_terminate() is a no-op if is already in TERMINATING state.
Use m0_rpc_conn_timedwait() to wait until conn is moved to TERMINATED or FAILED state.
Definition at line 1009 of file conn.c.
M0_INTERNAL void m0_rpc_conn_terminate_reply_received | ( | struct m0_rpc_item * | req | ) |
M0_INTERNAL void m0_rpc_conn_terminate_reply_sent | ( | struct m0_rpc_conn * | conn | ) |
Cleans up in memory state of rpc connection.
The conn_terminate FOM cannot free in-memory state of rpc connection. Because it needs to send conn_terminate_reply fop, by using session-0 of the rpc connection being terminated. Hence we cleanup in memory state of the conn when conn_terminate_reply has been sent.
Definition at line 1237 of file conn.c.
M0_INTERNAL int m0_rpc_conn_terminate_sync | ( | struct m0_rpc_conn * | conn, |
m0_time_t | abs_timeout | ||
) |
Same as m0_rpc_conn_terminate(), but in addition uses m0_rpc_conn_timedwait() to ensure that connection is in terminated state after m0_rpc_conn_terminate() call.
conn | A connection object to operate on. |
abs_timeout | Absolute time after which conn-terminate operation considered as failed and conn is moved to FAILED state. |
Definition at line 988 of file conn.c.
M0_INTERNAL int m0_rpc_conn_timedwait | ( | struct m0_rpc_conn * | conn, |
uint64_t | states, | ||
const m0_time_t | abs_timeout | ||
) |
Waits until reaches in any one of states specified by .
state_flags | can specify multiple states by using M0_BITS(). |
abs_timeout | should not sleep past abs_timeout waiting for conn to reach in desired state. |
Definition at line 700 of file conn.c.
M0_INTERNAL void m0_rpc_fom_conn_establish_fini | ( | struct m0_fom * | fom | ) |
M0_INTERNAL int m0_rpc_fom_conn_establish_tick | ( | struct m0_fom * | fom | ) |
M0_INTERNAL void m0_rpc_fom_conn_terminate_fini | ( | struct m0_fom * | fom | ) |
M0_INTERNAL int m0_rpc_fom_conn_terminate_tick | ( | struct m0_fom * | fom | ) |
M0_INTERNAL void m0_rpc_fom_session_establish_fini | ( | struct m0_fom * | fom | ) |
M0_INTERNAL int m0_rpc_fom_session_establish_tick | ( | struct m0_fom * | fom | ) |
M0_INTERNAL void m0_rpc_fom_session_terminate_fini | ( | struct m0_fom * | fom | ) |
M0_INTERNAL int m0_rpc_fom_session_terminate_tick | ( | struct m0_fom * | fom | ) |
M0_INTERNAL void m0_rpc_fop_conn_establish_ctx_init | ( | struct m0_rpc_item * | item, |
struct m0_net_end_point * | ep | ||
) |
Definition at line 209 of file session_fops.c.
M0_INTERNAL uint64_t m0_rpc_id_generate | ( | const struct m0_fid * | uniq_fid | ) |
Takes a unique fid and hashes it with id generated from timestamp seed to generate clusterwide unique RPC id.
Definition at line 96 of file session_utils.c.
M0_INTERNAL int m0_rpc_item_dispatch | ( | struct m0_rpc_item * | item | ) |
Temporary routine to place fop in a global queue, from where it can be selected for execution.
Definition at line 112 of file session_utils.c.
M0_INTERNAL bool m0_rpc_item_is_conn_establish | ( | const struct m0_rpc_item * | item | ) |
M0_INTERNAL bool m0_rpc_item_is_sess_establish | ( | const struct m0_rpc_item * | item | ) |
M0_INTERNAL int m0_rpc_machine_conn_list_dump | ( | struct m0_rpc_machine * | machine, |
int | dir | ||
) |
M0_INTERNAL int m0_rpc_rcv_conn_init | ( | struct m0_rpc_conn * | conn, |
struct m0_net_end_point * | ep, | ||
struct m0_rpc_machine * | machine, | ||
const struct m0_uint128 * | uuid | ||
) |
Initalises receiver end of conn object.
Definition at line 525 of file conn.c.
M0_INTERNAL int m0_rpc_rcv_conn_terminate | ( | struct m0_rpc_conn * | conn | ) |
Terminates receiver end of rpc connection.
Terminates alive sessions if any.
Definition at line 1217 of file conn.c.
M0_INTERNAL int m0_rpc_rcv_session_terminate | ( | struct m0_rpc_session * | session | ) |
Terminates receiver end of session.
Definition at line 822 of file session.c.
M0_INTERNAL void m0_rpc_session_cancel | ( | struct m0_rpc_session * | session | ) |
Iterates over all the items 'submitted to RPC and which are yet to receive reply' and invokes m0_rpc_item_cancel() for each of those.
Definition at line 850 of file session.c.
M0_INTERNAL int m0_rpc_session_create | ( | struct m0_rpc_session * | session, |
struct m0_rpc_conn * | conn, | ||
m0_time_t | abs_timeout | ||
) |
A combination of m0_rpc_session_init() and m0_rpc_session_establish_sync() in a single routine - initialize session object, establish a session and wait until it become idle.
Definition at line 352 of file session.c.
M0_INTERNAL size_t m0_rpc_session_default_home_locality | ( | const struct m0_fom * | fom | ) |
int m0_rpc_session_destroy | ( | struct m0_rpc_session * | session, |
m0_time_t | abs_timeout | ||
) |
A combination of m0_rpc_session_terminate_sync() and m0_rpc_session_fini() in a single routine - terminate the session, wait until it switched to terminated state and finalize session object.
Definition at line 559 of file session.c.
M0_INTERNAL int m0_rpc_session_establish | ( | struct m0_rpc_session * | session, |
m0_time_t | abs_timeout | ||
) |
Sends a SESSION_ESTABLISH fop across pre-defined session-0 in session->s_conn. Use m0_rpc_session_timedwait() to wait until session reaches IDLE or FAILED state.
Definition at line 390 of file session.c.
M0_INTERNAL void m0_rpc_session_establish_reply_received | ( | struct m0_rpc_item * | req | ) |
M0_INTERNAL int m0_rpc_session_establish_sync | ( | struct m0_rpc_session * | session, |
m0_time_t | abs_timeout | ||
) |
Same as m0_rpc_session_establish(), but in addition uses m0_rpc_session_timedwait() to ensure that session is in idle state after m0_rpc_session_establish() call.
session | A session object to operate on. |
abs_timeout | Absolute time after which session establish operation is aborted and session is moved to FAILED state. |
Definition at line 370 of file session.c.
M0_INTERNAL void m0_rpc_session_fini | ( | struct m0_rpc_session * | session | ) |
M0_INTERNAL void m0_rpc_session_fini_locked | ( | struct m0_rpc_session * | session | ) |
M0_INTERNAL void m0_rpc_session_fop_fini | ( | void | ) |
Definition at line 129 of file session_fops.c.
M0_INTERNAL int m0_rpc_session_fop_init | ( | void | ) |
M0_INTERNAL m0_bcount_t m0_rpc_session_get_max_item_payload_size | ( | const struct m0_rpc_session * | session | ) |
M0_INTERNAL m0_bcount_t m0_rpc_session_get_max_item_size | ( | const struct m0_rpc_session * | session | ) |
M0_INTERNAL void m0_rpc_session_hold_busy | ( | struct m0_rpc_session * | session | ) |
Holds a session in BUSY state. Every call to m0_rpc_session_hold_busy() must accompany call to m0_rpc_session_release()
Definition at line 782 of file session.c.
M0_INTERNAL int m0_rpc_session_init | ( | struct m0_rpc_session * | session, |
struct m0_rpc_conn * | conn | ||
) |
Initialises all fields of session. No network communication is involved.
session | session being initialised |
conn | rpc connection with which this session is associated |
Definition at line 204 of file session.c.
M0_INTERNAL int m0_rpc_session_init_locked | ( | struct m0_rpc_session * | session, |
struct m0_rpc_conn * | conn | ||
) |
M0_INTERNAL bool m0_rpc_session_invariant | ( | const struct m0_rpc_session * | session | ) |
M0_INTERNAL bool m0_rpc_session_is_cancelled | ( | struct m0_rpc_session * | session | ) |
M0_INTERNAL bool m0_rpc_session_is_idle | ( | const struct m0_rpc_session * | session | ) |
M0_INTERNAL void m0_rpc_session_item_failed | ( | struct m0_rpc_item * | item | ) |
M0_INTERNAL void m0_rpc_session_module_fini | ( | void | ) |
Finalises all session realted fop types
Definition at line 52 of file session_utils.c.
M0_INTERNAL int m0_rpc_session_module_init | ( | void | ) |
Initialises all the session related fop types
Definition at line 47 of file session_utils.c.
M0_INTERNAL struct m0_rpc_session * m0_rpc_session_pop | ( | const struct m0_rpc_conn * | conn | ) |
Pops first valid session from conn->c_sessions list
Definition at line 790 of file conn.c.
M0_INTERNAL void m0_rpc_session_quiesce | ( | struct m0_rpc_session * | session | ) |
M0_INTERNAL void m0_rpc_session_release | ( | struct m0_rpc_session * | session | ) |
Decrements hold count. Moves session to IDLE state if it becomes idle.
Definition at line 791 of file session.c.
M0_INTERNAL void m0_rpc_session_reset | ( | struct m0_rpc_session * | session | ) |
M0_INTERNAL struct m0_rpc_session * m0_rpc_session_search | ( | const struct m0_rpc_conn * | conn, |
uint64_t | session_id | ||
) |
Searches in conn->c_sessions list, a session object whose session id matches with given .
Caller is expected to decide whether conn will be locked or not The function is also called from session_foms.c, that's why is not static.
Definition at line 760 of file conn.c.
M0_INTERNAL struct m0_rpc_session * m0_rpc_session_search_and_pop | ( | const struct m0_rpc_conn * | conn, |
uint64_t | session_id | ||
) |
Searches in conn->c_sessions list, a session object whose session id matches with given and pops it from this list.
Definition at line 772 of file conn.c.
M0_INTERNAL const char * m0_rpc_session_state_to_str | ( | enum m0_rpc_session_state | state | ) |
Transforms m0_rpc_session_state value to string
Definition at line 892 of file session.c.
M0_INTERNAL int m0_rpc_session_terminate | ( | struct m0_rpc_session * | session, |
m0_time_t | abs_timeout | ||
) |
Sends terminate session fop to receiver. Acts as no-op if session is already in TERMINATING state. Does not wait for reply. Use m0_rpc_session_timedwait() to wait until session reaches TERMINATED or FAILED state.
Definition at line 622 of file session.c.
M0_INTERNAL void m0_rpc_session_terminate_reply_received | ( | struct m0_rpc_item * | req | ) |
M0_INTERNAL int m0_rpc_session_terminate_sync | ( | struct m0_rpc_session * | session, |
m0_time_t | abs_timeout | ||
) |
Same as m0_rpc_session_terminate(), but in addition uses m0_rpc_session_timedwait() to ensure that session is in terminated state after m0_rpc_session_terminate() call.
session | A session object to operate on. |
abs_timeout | Absolute time after which session terminate operation is considered as failed and session is moved to FAILED state. |
Definition at line 592 of file session.c.
M0_INTERNAL int m0_rpc_session_timedwait | ( | struct m0_rpc_session * | session, |
uint64_t | states, | ||
const m0_time_t | abs_timeout | ||
) |
Waits until object reaches in one of states given by .
states | can specify multiple states by using M0_BITS() |
abs_timeout | thread does not sleep past abs_timeout waiting for conn to reach in desired state. |
Definition at line 332 of file session.c.
M0_INTERNAL int m0_rpc_session_validate | ( | struct m0_rpc_session * | session | ) |
M0_TL_DECLARE | ( | rpc_session | , |
M0_INTERNAL | , | ||
struct m0_rpc_session | |||
) |
M0_TL_DECLARE | ( | pending_item | , |
M0_INTERNAL | , | ||
struct m0_rpc_item | |||
) |
M0_TL_DEFINE | ( | rpc_session | , |
M0_INTERNAL | , | ||
struct m0_rpc_session | |||
) |
M0_TL_DESCR_DECLARE | ( | rpc_session | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DECLARE | ( | pending_item | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DEFINE | ( | rpc_session | , |
"rpc-sessions" | , | ||
M0_INTERNAL | , | ||
struct m0_rpc_session | , | ||
s_link | , | ||
s_magic | , | ||
M0_RPC_SESSION_MAGIC | , | ||
M0_RPC_SESSION_HEAD_MAGIC | |||
) |
struct m0_rpc_fop_conn_establish M0_XCA_DOMAIN | ( | rpc | ) |
|
static |
M0_INTERNAL struct m0_rpc_chan* rpc_chan_get | ( | struct m0_rpc_machine * | machine, |
struct m0_net_end_point * | dest_ep, | ||
uint64_t | max_rpcs_in_flight | ||
) |
Definition at line 635 of file rpc_machine.c.
M0_INTERNAL void rpc_chan_put | ( | struct m0_rpc_chan * | chan | ) |
Definition at line 729 of file rpc_machine.c.
|
static |
|
static |
|
static |
Definition at line 1367 of file conn.c.
|
static |
Callback called on HA notification for conf service object the connection is established to. In case service found dead, all outgoing requests in all sessions associated with the connection are canceled.
Definition at line 1342 of file conn.c.
|
static |
HA needs to be notified in case rpc item is not replied within the timer's interval. This is to indicate that peered service may experience issues with networking, and thus the service status has to be considered M0_NC_TRANSIENT until reply comes back to sender.
See item__on_reply_postprocess() for complimentary part of the item's processing.
Definition at line 1459 of file conn.c.
|
static |
Connection's session list cleanup omitting session0. When instructed to fail, all finalising sessions are put to failed state. Otherwise are waited for getting to idle state before being finalised.
Definition at line 1187 of file conn.c.
|
static |
Definition at line 134 of file session_foms.c.
|
static |
|
static |
Moves session to FAILED state and take it out of conn->c_sessions list.
Definition at line 474 of file session.c.
|
static |
implementation of fop->f_type->ft_fom_type.ft_ops->fto_create for conn establish, conn terminate, session establish, session terminate fop types.
Definition at line 61 of file session_foms.c.
|
static |
Common implementation of m0_fom::fo_ops::fo_fini() for conn establish, conn terminate, session establish and session terminate foms
Definition at line 50 of file session_foms.c.
|
static |
M0_INTERNAL struct m0_rpc_machine * session_machine | ( | const struct m0_rpc_session * | s | ) |
M0_INTERNAL int session_state | ( | const struct m0_rpc_session * | session | ) |
M0_INTERNAL void session_state_set | ( | struct m0_rpc_session * | session, |
int | state | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 115 of file session_fops.c.
|
static |
|
static |
|
static |
Definition at line 587 of file session_foms.c.
const struct m0_fom_ops m0_rpc_fom_conn_establish_ops |
Definition at line 157 of file session_foms.c.
const struct m0_fom_ops m0_rpc_fom_conn_establish_ops |
Definition at line 157 of file session_foms.c.
struct m0_fom_type m0_rpc_fom_conn_establish_type |
struct m0_fom_type_ops m0_rpc_fom_conn_establish_type_ops |
Definition at line 163 of file session_foms.c.
struct m0_fom_type_ops m0_rpc_fom_conn_establish_type_ops |
Definition at line 163 of file session_foms.c.
const struct m0_fom_ops m0_rpc_fom_conn_terminate_ops |
Definition at line 548 of file session_foms.c.
const struct m0_fom_ops m0_rpc_fom_conn_terminate_ops |
Definition at line 548 of file session_foms.c.
struct m0_fom_type m0_rpc_fom_conn_terminate_type |
struct m0_fom_type_ops m0_rpc_fom_conn_terminate_type_ops |
Definition at line 554 of file session_foms.c.
struct m0_fom_type_ops m0_rpc_fom_conn_terminate_type_ops |
Definition at line 554 of file session_foms.c.
|
static |
Definition at line 42 of file session_fops.c.
M0_INTERNAL const struct m0_sm_conf m0_rpc_fom_sess_conn_term_phases_sm_conf |
Definition at line 59 of file session_fops.c.
const struct m0_fom_ops m0_rpc_fom_session_establish_ops |
Definition at line 308 of file session_foms.c.
const struct m0_fom_ops m0_rpc_fom_session_establish_ops |
Definition at line 308 of file session_foms.c.
struct m0_fom_type m0_rpc_fom_session_establish_type |
struct m0_fom_type_ops m0_rpc_fom_session_establish_type_ops |
Definition at line 314 of file session_foms.c.
struct m0_fom_type_ops m0_rpc_fom_session_establish_type_ops |
Definition at line 314 of file session_foms.c.
const struct m0_fom_ops m0_rpc_fom_session_terminate_ops |
Definition at line 426 of file session_foms.c.
const struct m0_fom_ops m0_rpc_fom_session_terminate_ops |
Definition at line 426 of file session_foms.c.
struct m0_fom_type m0_rpc_fom_session_terminate_type |
struct m0_fom_type_ops m0_rpc_fom_session_terminate_type_ops |
Definition at line 432 of file session_foms.c.
struct m0_fom_type_ops m0_rpc_fom_session_terminate_type_ops |
Definition at line 432 of file session_foms.c.
struct m0_fop_type m0_rpc_fop_conn_establish_fopt |
Definition at line 120 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_conn_establish_fopt |
Definition at line 120 of file session_fops.c.
const struct m0_fop_type_ops m0_rpc_fop_conn_establish_ops |
struct m0_fop_type m0_rpc_fop_conn_establish_rep_fopt |
Definition at line 121 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_conn_establish_rep_fopt |
Definition at line 121 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_conn_terminate_fopt |
Definition at line 122 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_conn_terminate_fopt |
Definition at line 122 of file session_fops.c.
const struct m0_fop_type_ops m0_rpc_fop_conn_terminate_ops |
struct m0_fop_type m0_rpc_fop_conn_terminate_rep_fopt |
Definition at line 123 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_conn_terminate_rep_fopt |
Definition at line 123 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_session_establish_fopt |
Definition at line 124 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_session_establish_fopt |
Definition at line 124 of file session_fops.c.
const struct m0_fop_type_ops m0_rpc_fop_session_establish_ops |
struct m0_fop_type m0_rpc_fop_session_establish_rep_fopt |
Definition at line 125 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_session_establish_rep_fopt |
Definition at line 125 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_session_terminate_fopt |
Definition at line 126 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_session_terminate_fopt |
Definition at line 126 of file session_fops.c.
const struct m0_fop_type_ops m0_rpc_fop_session_terminate_ops |
struct m0_fop_type m0_rpc_fop_session_terminate_rep_fopt |
Definition at line 127 of file session_fops.c.
struct m0_fop_type m0_rpc_fop_session_terminate_rep_fopt |
Definition at line 127 of file session_fops.c.
struct m0_reqh_service_type m0_rpc_service_type |
enum { ... } M0_XCA_DOMAIN |
|
static |
|
static |
|
static |
|
static |
|
static |