Motr  M0
Request handler
Collaboration diagram for Request handler:

Modules

 Request handler service
 

Data Structures

struct  disallowed_fop_reply
 
struct  m0_reqh
 
struct  m0_reqh_init_args
 
struct  reqh_ut_balloc
 

Macros

#define M0_REQH_INIT(reqh, ...)
 
#define CLIENT_ENDPOINT_ADDR   "0@lo:12345:34:*"
 
#define SERVER_ENDPOINT_ADDR   "0@lo:12345:34:1"
 
#define SERVER_DB_NAME   "reqh_ut_stob/sdb"
 
#define SERVER_BDOM_LOCATION   "linuxstob:./reqh_fom_ut"
 
#define SERVER_BDOM_KEY   0xBAC570BD
 

Enumerations

enum  { DEFAULT_ADDB2_RECORD_SIZE = 128ULL << 20, MIN_ADDB2_RECORD_SIZE = 10ULL << 20, MAX_ADDB2_RECORD_SIZE = 10ULL << 30, DEFAULT_CLIENT_ADDB2_RECORD_SIZE = 128ULL << 20 }
 
enum  m0_reqh_states {
  M0_REQH_ST_INIT, M0_REQH_ST_NORMAL, M0_REQH_ST_DRAIN, M0_REQH_ST_SVCS_STOP,
  M0_REQH_ST_STOPPED, M0_REQH_ST_NR
}
 
enum  { CLIENT_COB_DOM_ID = 101, MAX_RPCS_IN_FLIGHT = 32, MAX_RETRIES = 5 }
 

Functions

 M0_TL_DESCR_DEFINE (m0_reqh_svc, "reqh service", M0_INTERNAL, struct m0_reqh_service, rs_linkage, rs_magix, M0_REQH_SVC_MAGIC, M0_REQH_SVC_HEAD_MAGIC)
 
 M0_TL_DEFINE (m0_reqh_svc, M0_INTERNAL, struct m0_reqh_service)
 
 M0_BOB_DEFINE (M0_INTERNAL, &rqsvc_bob, m0_reqh_service)
 
 M0_TL_DESCR_DEFINE (m0_reqh_rpc_mach, "rpc machines",, struct m0_rpc_machine, rm_rh_linkage, rm_magix, M0_RPC_MACHINE_MAGIC, M0_REQH_RPC_MACH_HEAD_MAGIC)
 
 M0_TL_DEFINE (m0_reqh_rpc_mach,, struct m0_rpc_machine)
 
 M0_LOCKERS_DEFINE (M0_INTERNAL, m0_reqh, rh_lockers)
 
static void __reqh_fini (struct m0_reqh *reqh)
 
M0_INTERNAL bool m0_reqh_invariant (const struct m0_reqh *reqh)
 
M0_INTERNAL int m0_reqh_mdpool_layout_build (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_layouts_cleanup (struct m0_reqh *reqh)
 
M0_INTERNAL struct m0_rpc_sessionm0_reqh_mdpool_service_index_to_session (const struct m0_reqh *reqh, const struct m0_fid *gob_fid, uint32_t index)
 
M0_INTERNAL int m0_reqh_init (struct m0_reqh *reqh, const struct m0_reqh_init_args *reqh_args)
 
M0_INTERNAL int m0_reqh_be_init (struct m0_reqh *reqh, struct m0_be_seg *seg)
 
M0_INTERNAL void m0_reqh_be_fini (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_fini (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqhs_fini (void)
 
M0_INTERNAL int m0_reqhs_init (void)
 
M0_INTERNAL int m0_reqh_addb2_init (struct m0_reqh *reqh, const char *location, uint64_t key, bool mkfs, bool force, m0_bcount_t size)
 
M0_INTERNAL void m0_reqh_addb2_fini (struct m0_reqh *reqh)
 
M0_INTERNAL int m0_reqh_state_get (struct m0_reqh *reqh)
 
static void reqh_state_set (struct m0_reqh *reqh, enum m0_reqh_states state)
 
M0_INTERNAL int m0_reqh_services_state_count (struct m0_reqh *reqh, int state)
 
M0_INTERNAL int m0_reqh_fop_allow (struct m0_reqh *reqh, struct m0_fop *fop)
 
static int disallowed_fop_tick (struct m0_fom *fom, void *data, int *phase)
 
static void disallowed_fop_free (struct m0_fom_simple *sfom)
 
static void fop_disallowed (struct m0_reqh *reqh, struct m0_fop *req_fop, int rc)
 
M0_INTERNAL int m0_reqh_fop_handle (struct m0_reqh *reqh, struct m0_fop *fop)
 
M0_INTERNAL void m0_reqh_idle_wait_for (struct m0_reqh *reqh, struct m0_reqh_service *service)
 
M0_INTERNAL void m0_reqh_idle_wait (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_services_prepare_to_stop (struct m0_reqh *reqh, unsigned level)
 
M0_INTERNAL void m0_reqh_shutdown (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_shutdown_wait (struct m0_reqh *reqh)
 
static void __reqh_svcs_stop (struct m0_reqh *reqh, unsigned level)
 
M0_INTERNAL void m0_reqh_services_terminate (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_pre_storage_fini_svcs_stop (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_post_storage_fini_svcs_stop (struct m0_reqh *reqh)
 
M0_INTERNAL void m0_reqh_start (struct m0_reqh *reqh)
 
M0_INTERNAL uint64_t m0_reqh_nr_localities (const struct m0_reqh *reqh)
 
M0_INTERNAL int m0_reqh_conf_setup (struct m0_reqh *reqh, struct m0_confc_args *args)
 
M0_INTERNAL struct m0_confcm0_reqh2confc (struct m0_reqh *reqh)
 
M0_INTERNAL struct m0_fidm0_reqh2profile (struct m0_reqh *reqh)
 
 M0_LOCKERS_DECLARE (M0_EXTERN, m0_reqh, 256)
 
M0_INTERNAL int m0_reqh_addb2_submit (struct m0_reqh *reqh, struct m0_addb2_trace_obj *tobj)
 
 M0_TL_DESCR_DECLARE (m0_reqh_svc, M0_EXTERN)
 
 M0_TL_DECLARE (m0_reqh_svc, M0_INTERNAL, struct m0_reqh_service)
 
 M0_BOB_DECLARE (M0_EXTERN, m0_reqh_service)
 
 M0_TL_DESCR_DECLARE (m0_reqh_rpc_mach, extern)
 
 M0_TL_DECLARE (m0_reqh_rpc_mach,, struct m0_rpc_machine)
 
static struct reqh_ut_ballocgetballoc (struct m0_ad_balloc *ballroom)
 
static int reqh_ut_balloc_init (struct m0_ad_balloc *ballroom, struct m0_be_seg *db, uint32_t bshift, m0_bindex_t container_size, m0_bcount_t groupsize, m0_bcount_t spare_reserve)
 
static void reqh_ut_balloc_fini (struct m0_ad_balloc *ballroom)
 
static int reqh_ut_balloc_alloc (struct m0_ad_balloc *ballroom, struct m0_dtx *tx, m0_bcount_t count, struct m0_ext *out, uint64_t alloc_zone)
 
static int reqh_ut_balloc_free (struct m0_ad_balloc *ballroom, struct m0_dtx *tx, struct m0_ext *ext)
 
static int reqh_ut_reserve_extent (struct m0_ad_balloc *ballroom, struct m0_be_tx *tx, struct m0_ext *ext, uint64_t alloc_zone)
 
struct m0_stob_domainreqh_ut_stob_domain_find (void)
 
static int server_init (const char *stob_path, const char *srv_db_name, struct m0_net_domain *net_dom, uint64_t back_key, struct m0_stob_domain **bdom)
 
static void server_fini (struct m0_stob_domain *bdom, uint64_t back_key)
 
static void fop_send (struct m0_fop *fop, struct m0_rpc_session *session)
 
static void create_send (struct m0_rpc_session *session)
 
static void read_send (struct m0_rpc_session *session)
 
static void write_send (struct m0_rpc_session *session)
 
void test_reqh (void)
 

Variables

static struct m0_bob_type rqsvc_bob
 
struct m0_reqh_service_type m0_rpc_service_type
 
static struct m0_sm_state_descr m0_reqh_sm_descr []
 
static const struct m0_sm_conf m0_reqh_sm_conf
 
struct m0_reqh_service_type m0_ha_entrypoint_service_type
 
struct m0_reqh_service_type m0_ha_link_service_type
 
M0_EXTERN struct m0_reqh_service_type m0_cas_service_type
 
static struct m0_stob_domainsdom
 
static struct m0_mdstore srv_mdstore
 
static struct m0_cob_domain_id srv_cob_dom_id
 
static struct m0_rpc_machine srv_rpc_mach
 
static struct m0_be_ut_backend ut_be
 
static struct m0_be_ut_seg ut_seg
 
static struct m0_reqh_servicereqh_ut_service
 
static struct m0_reqh_servicefdmi_ut_service
 
static struct m0_reqh reqh
 
static const struct m0_ad_balloc_ops reqh_ut_balloc_ops
 
struct reqh_ut_balloc rb
 
static struct m0_net_buffer_pool app_pool
 
struct m0_ut_suite reqh_ut
 

Detailed Description

Request handler provides non-blocking infrastructure for fop execution. There typically is a single request handler instance per address space, once the request handler is initialised and ready to serve requests, it accepts a fop (file operation packet), interprets it by interacting with other sub systems and executes the desired file system operation.

For every incoming fop, request handler creates a corresponding fom (file operation state machine), fop is executed in this fom context. For every fom, request handler performs some standard operations such as authentication, locating resources for its execution, authorisation of file operation by the user, &c. Once all the standard phases are completed, the fop specific operation is executed.

Macro Definition Documentation

◆ CLIENT_ENDPOINT_ADDR

#define CLIENT_ENDPOINT_ADDR   "0@lo:12345:34:*"

Server side structures and objects

Definition at line 61 of file reqh_fom_ut.c.

◆ M0_REQH_INIT

#define M0_REQH_INIT (   reqh,
  ... 
)
Value:
m0_reqh_init((reqh), &(const struct m0_reqh_init_args) { \
__VA_ARGS__ })
M0_INTERNAL int m0_reqh_init(struct m0_reqh *reqh, const struct m0_reqh_init_args *reqh_args)
Definition: reqh.c:227
struct m0_reqh reqh
Definition: rm_foms.c:48

Definition at line 262 of file reqh.h.

◆ SERVER_BDOM_KEY

#define SERVER_BDOM_KEY   0xBAC570BD

Definition at line 65 of file reqh_fom_ut.c.

◆ SERVER_BDOM_LOCATION

#define SERVER_BDOM_LOCATION   "linuxstob:./reqh_fom_ut"

Definition at line 64 of file reqh_fom_ut.c.

◆ SERVER_DB_NAME

#define SERVER_DB_NAME   "reqh_ut_stob/sdb"

Definition at line 63 of file reqh_fom_ut.c.

◆ SERVER_ENDPOINT_ADDR

#define SERVER_ENDPOINT_ADDR   "0@lo:12345:34:1"

Definition at line 62 of file reqh_fom_ut.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_ADDB2_RECORD_SIZE 

Default ADDB Record record size in bytes (128M)

MIN_ADDB2_RECORD_SIZE 

Min ADDB Record record size in bytes (10M)

MAX_ADDB2_RECORD_SIZE 

Max ADDB Record record size in bytes (10G)

DEFAULT_CLIENT_ADDB2_RECORD_SIZE 

Default Client ADDB Record record size in bytes (128M)

Definition at line 63 of file reqh.h.

◆ anonymous enum

anonymous enum
Enumerator
CLIENT_COB_DOM_ID 
MAX_RPCS_IN_FLIGHT 
MAX_RETRIES 

Definition at line 67 of file reqh_fom_ut.c.

◆ m0_reqh_states

Request handler states.

Enumerator
M0_REQH_ST_INIT 
M0_REQH_ST_NORMAL 
M0_REQH_ST_DRAIN 
M0_REQH_ST_SVCS_STOP 
M0_REQH_ST_STOPPED 
M0_REQH_ST_NR 

Definition at line 82 of file reqh.h.

Function Documentation

◆ __reqh_fini()

static void __reqh_fini ( struct m0_reqh reqh)
static

Definition at line 298 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __reqh_svcs_stop()

static void __reqh_svcs_stop ( struct m0_reqh reqh,
unsigned  level 
)
static

Definition at line 653 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_send()

static void create_send ( struct m0_rpc_session session)
static

Sends create fop request.

Definition at line 353 of file reqh_fom_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disallowed_fop_free()

static void disallowed_fop_free ( struct m0_fom_simple sfom)
static

Definition at line 520 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ disallowed_fop_tick()

static int disallowed_fop_tick ( struct m0_fom fom,
void *  data,
int *  phase 
)
static

Definition at line 499 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fop_disallowed()

static void fop_disallowed ( struct m0_reqh reqh,
struct m0_fop req_fop,
int  rc 
)
static

Definition at line 525 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fop_send()

static void fop_send ( struct m0_fop fop,
struct m0_rpc_session session 
)
static

Definition at line 341 of file reqh_fom_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getballoc()

static struct reqh_ut_balloc* getballoc ( struct m0_ad_balloc ballroom)
static

Definition at line 97 of file reqh_fom_ut.c.

Here is the caller graph for this function:

◆ M0_BOB_DECLARE()

M0_BOB_DECLARE ( M0_EXTERN  ,
m0_reqh_service   
)

◆ M0_BOB_DEFINE()

M0_BOB_DEFINE ( M0_INTERNAL  ,
rqsvc_bob,
m0_reqh_service   
)

◆ M0_LOCKERS_DECLARE()

M0_LOCKERS_DECLARE ( M0_EXTERN  ,
m0_reqh  ,
256   
)

◆ M0_LOCKERS_DEFINE()

M0_LOCKERS_DEFINE ( M0_INTERNAL  ,
m0_reqh  ,
rh_lockers   
)

◆ m0_reqh2confc()

M0_INTERNAL struct m0_confc * m0_reqh2confc ( struct m0_reqh reqh)

Definition at line 753 of file reqh.c.

◆ m0_reqh2profile()

M0_INTERNAL struct m0_fid * m0_reqh2profile ( struct m0_reqh reqh)

Definition at line 758 of file reqh.c.

Here is the caller graph for this function:

◆ m0_reqh_addb2_fini()

M0_INTERNAL void m0_reqh_addb2_fini ( struct m0_reqh reqh)

Definition at line 383 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_addb2_init()

M0_INTERNAL int m0_reqh_addb2_init ( struct m0_reqh reqh,
const char *  location,
uint64_t  key,
bool  mkfs,
bool  force,
m0_bcount_t  size 
)
Todo:
replace size constant (size) with a value from confc.

Definition at line 341 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_addb2_submit()

M0_INTERNAL int m0_reqh_addb2_submit ( struct m0_reqh reqh,
struct m0_addb2_trace_obj tobj 
)

◆ m0_reqh_be_fini()

M0_INTERNAL void m0_reqh_be_fini ( struct m0_reqh reqh)

Finalises be-dependant part of request handler.

Definition at line 289 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_be_init()

M0_INTERNAL int m0_reqh_be_init ( struct m0_reqh reqh,
struct m0_be_seg seg 
)

Initialises be-dependant part (in future) of request handler.

Definition at line 269 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_conf_setup()

M0_INTERNAL int m0_reqh_conf_setup ( struct m0_reqh reqh,
struct m0_confc_args args 
)

Initialises confc.

Definition at line 729 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_fini()

M0_INTERNAL void m0_reqh_fini ( struct m0_reqh reqh)

Destructor for request handler, no fop will be further executed in the address space belonging to this request handler.

Parameters
reqh,requesthandler to be finalised
Precondition
reqh != NULL

Definition at line 320 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_fop_allow()

M0_INTERNAL int m0_reqh_fop_allow ( struct m0_reqh reqh,
struct m0_fop fop 
)

Decide whether to process an incoming FOP.

Precondition
m0_rewlock_read_lock(&reqh->rh_rwlock)

Definition at line 437 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_fop_handle()

M0_INTERNAL int m0_reqh_fop_handle ( struct m0_reqh reqh,
struct m0_fop fop 
)

Submit fop for request handler processing. Request handler initialises fom corresponding to this fop, finds appropriate locality to execute this fom, and enqueues the fom into its runq. Fop processing results are reported by other means (ADDB, reply fops, error messages, etc.) so this function returns nothing.

Parameters
reqh,requesthandler processing the fop
fop,fopto be executed
Precondition
reqh != null
fop != null

Definition at line 546 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_idle_wait()

M0_INTERNAL void m0_reqh_idle_wait ( struct m0_reqh reqh)

Waits on the request handler channel (m0_reqh::rh_sd_signal) until the FOM domain (m0_fom_dom()) is idle.

Note
Use with caution. This can block forever if FOMs do not terminate.
See also
m0_fom_domain_is_idle()
m0_reqh_shutdown_wait()

Definition at line 606 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_idle_wait_for()

M0_INTERNAL void m0_reqh_idle_wait_for ( struct m0_reqh reqh,
struct m0_reqh_service service 
)

Waits until foms of the given service are gone.

Definition at line 591 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_init()

M0_INTERNAL int m0_reqh_init ( struct m0_reqh reqh,
const struct m0_reqh_init_args args 
)

Initialises request handler instance provided by the caller.

Parameters
reqhRequest handler instance to be initialised
Todo:
use iostores instead of m0_cob_domain
See also
m0_reqh
Postcondition
m0_reqh_invariant()

Definition at line 227 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_invariant()

M0_INTERNAL bool m0_reqh_invariant ( const struct m0_reqh reqh)

Definition at line 136 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_layouts_cleanup()

M0_INTERNAL void m0_reqh_layouts_cleanup ( struct m0_reqh reqh)

Release layouts in layout domain.

Definition at line 169 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_mdpool_layout_build()

M0_INTERNAL int m0_reqh_mdpool_layout_build ( struct m0_reqh reqh)

Definition at line 145 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_mdpool_service_index_to_session()

M0_INTERNAL struct m0_rpc_session * m0_reqh_mdpool_service_index_to_session ( const struct m0_reqh reqh,
const struct m0_fid gfid,
uint32_t  index 
)

Returns the remote rpc session of the service in mdpool on which meta data cob is present.

Parameters
indexindex of the remote service in mdpool.
Precondition
index < pools_common.pc_md_redundancy

Definition at line 177 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_nr_localities()

M0_INTERNAL uint64_t m0_reqh_nr_localities ( const struct m0_reqh reqh)

Returns number of localities in request handler FOM domain.

Definition at line 723 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_post_storage_fini_svcs_stop()

M0_INTERNAL void m0_reqh_post_storage_fini_svcs_stop ( struct m0_reqh reqh)

Definition at line 704 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_pre_storage_fini_svcs_stop()

M0_INTERNAL void m0_reqh_pre_storage_fini_svcs_stop ( struct m0_reqh reqh)

Definition at line 681 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_services_prepare_to_stop()

M0_INTERNAL void m0_reqh_services_prepare_to_stop ( struct m0_reqh reqh,
unsigned  level 
)

Initiates stopping services of the given level and below it

Definition at line 620 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_services_state_count()

M0_INTERNAL int m0_reqh_services_state_count ( struct m0_reqh reqh,
int  state 
)

Returns a count of services in a specified state.

Parameters
reqhrequest handler
stateService state
Precondition
M0_IN(m0_reqh_state_get(reqh), (M0_REQH_ST_NORMAL, M0_REQH_ST_DRAIN, M0_REQH_ST_SVCS_STOP))

Definition at line 413 of file reqh.c.

Here is the call graph for this function:

◆ m0_reqh_services_terminate()

M0_INTERNAL void m0_reqh_services_terminate ( struct m0_reqh reqh)

Stops and finalises all the services registered with a request handler, but not the management service.

Precondition
M0_IN(m0_reqh_state_get(reqh), (M0_REQH_ST_DRAIN, M0_REQH_ST_INIT))
Postcondition
m0_reqh_state_get(reqh) == M0_REQH_ST_STOPPED
See also
m0_reqh_service_stop()
m0_reqh_service_fini()

Definition at line 675 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_shutdown()

M0_INTERNAL void m0_reqh_shutdown ( struct m0_reqh reqh)

Initiates the termination of services.

Parameters
reqhrequest handler to be shutdown
Precondition
m0_reqh_state_get(reqh) == M0_REQH_ST_NORMAL
Postcondition
m0_reqh_state_get(reqh) == M0_REQH_ST_DRAIN
See also
m0_reqh_service_prepare_to_stop(), m0_reqh_idle_wait()

Definition at line 636 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_shutdown_wait()

M0_INTERNAL void m0_reqh_shutdown_wait ( struct m0_reqh reqh)

Initiates the termination of services and then wait for FOMs to terminate.

Parameters
reqhrequest handler to be shutdown
Precondition
m0_reqh_state_get(reqh) == M0_REQH_ST_NORMAL
Postcondition
m0_reqh_state_get(reqh) == M0_REQH_ST_DRAIN
See also
m0_reqh_service_prepare_to_stop(), m0_reqh_idle_wait()

Definition at line 647 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_start()

M0_INTERNAL void m0_reqh_start ( struct m0_reqh reqh)

Notify the request handler that normal operation should commence.

The subroutine does not enforce that a management service is configured because UTs frequently do not require this.

Precondition
m0_reqh_state_get(reqh) == M0_REQH_ST_INIT
Postcondition
m0_reqh_state_get(reqh) == M0_REQH_ST_NORMAL

Definition at line 711 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqh_state_get()

M0_INTERNAL int m0_reqh_state_get ( struct m0_reqh reqh)

Get the state of the request handler.

Definition at line 398 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_reqhs_fini()

M0_INTERNAL void m0_reqhs_fini ( void  )

Finalises global reqh objects, invoked from m0_fini().

Definition at line 328 of file reqh.c.

Here is the call graph for this function:

◆ m0_reqhs_init()

M0_INTERNAL int m0_reqhs_init ( void  )

Initialises global reqh objects like reqh fops.

Invoked from m0_init().

Definition at line 333 of file reqh.c.

Here is the call graph for this function:

◆ M0_TL_DECLARE() [1/2]

M0_TL_DECLARE ( m0_reqh_svc  ,
M0_INTERNAL  ,
struct m0_reqh_service   
)

◆ M0_TL_DECLARE() [2/2]

M0_TL_DECLARE ( m0_reqh_rpc_mach  ,
struct m0_rpc_machine   
)

◆ M0_TL_DEFINE() [1/2]

M0_TL_DEFINE ( m0_reqh_svc  ,
M0_INTERNAL  ,
struct m0_reqh_service   
)

◆ M0_TL_DEFINE() [2/2]

M0_TL_DEFINE ( m0_reqh_rpc_mach  ,
struct m0_rpc_machine   
)

◆ M0_TL_DESCR_DECLARE() [1/2]

M0_TL_DESCR_DECLARE ( m0_reqh_svc  ,
M0_EXTERN   
)

Descriptor for tlist of request handler services.

◆ M0_TL_DESCR_DECLARE() [2/2]

M0_TL_DESCR_DECLARE ( m0_reqh_rpc_mach  ,
extern   
)

Descriptor for tlist of rpc machines.

◆ M0_TL_DESCR_DEFINE() [1/2]

M0_TL_DESCR_DEFINE ( m0_reqh_svc  ,
"reqh service ,
M0_INTERNAL  ,
struct m0_reqh_service  ,
rs_linkage  ,
rs_magix  ,
M0_REQH_SVC_MAGIC  ,
M0_REQH_SVC_HEAD_MAGIC   
)

Tlist descriptor for reqh services.

◆ M0_TL_DESCR_DEFINE() [2/2]

M0_TL_DESCR_DEFINE ( m0_reqh_rpc_mach  ,
"rpc machines"  ,
struct m0_rpc_machine  ,
rm_rh_linkage  ,
rm_magix  ,
M0_RPC_MACHINE_MAGIC  ,
M0_REQH_RPC_MACH_HEAD_MAGIC   
)

Tlist descriptor for rpc machines.

◆ read_send()

static void read_send ( struct m0_rpc_session session)
static

Sends read fop request.

Definition at line 369 of file reqh_fom_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reqh_state_set()

static void reqh_state_set ( struct m0_reqh reqh,
enum m0_reqh_states  state 
)
static

Definition at line 405 of file reqh.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reqh_ut_balloc_alloc()

static int reqh_ut_balloc_alloc ( struct m0_ad_balloc ballroom,
struct m0_dtx tx,
m0_bcount_t  count,
struct m0_ext out,
uint64_t  alloc_zone 
)
static

Definition at line 122 of file reqh_fom_ut.c.

Here is the call graph for this function:

◆ reqh_ut_balloc_fini()

static void reqh_ut_balloc_fini ( struct m0_ad_balloc ballroom)
static

Definition at line 115 of file reqh_fom_ut.c.

Here is the call graph for this function:

◆ reqh_ut_balloc_free()

static int reqh_ut_balloc_free ( struct m0_ad_balloc ballroom,
struct m0_dtx tx,
struct m0_ext ext 
)
static

Definition at line 138 of file reqh_fom_ut.c.

◆ reqh_ut_balloc_init()

static int reqh_ut_balloc_init ( struct m0_ad_balloc ballroom,
struct m0_be_seg db,
uint32_t  bshift,
m0_bindex_t  container_size,
m0_bcount_t  groupsize,
m0_bcount_t  spare_reserve 
)
static

Definition at line 102 of file reqh_fom_ut.c.

Here is the call graph for this function:

◆ reqh_ut_reserve_extent()

static int reqh_ut_reserve_extent ( struct m0_ad_balloc ballroom,
struct m0_be_tx tx,
struct m0_ext ext,
uint64_t  alloc_zone 
)
static

Definition at line 144 of file reqh_fom_ut.c.

◆ reqh_ut_stob_domain_find()

struct m0_stob_domain* reqh_ut_stob_domain_find ( void  )

Definition at line 169 of file reqh_fom_ut.c.

Here is the caller graph for this function:

◆ server_fini()

static void server_fini ( struct m0_stob_domain bdom,
uint64_t  back_key 
)
static

Definition at line 292 of file reqh_fom_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ server_init()

static int server_init ( const char *  stob_path,
const char *  srv_db_name,
struct m0_net_domain net_dom,
uint64_t  back_key,
struct m0_stob_domain **  bdom 
)
static

Definition at line 174 of file reqh_fom_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_reqh()

void test_reqh ( void  )

Test function for reqh ut

Definition at line 409 of file reqh_fom_ut.c.

Here is the call graph for this function:

◆ write_send()

static void write_send ( struct m0_rpc_session session)
static

Sends write fop request.

Definition at line 385 of file reqh_fom_ut.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ app_pool

struct m0_net_buffer_pool app_pool
static

Definition at line 167 of file reqh_fom_ut.c.

◆ fdmi_ut_service

struct m0_reqh_service* fdmi_ut_service
static

Definition at line 80 of file reqh_fom_ut.c.

◆ m0_cas_service_type

M0_EXTERN struct m0_reqh_service_type m0_cas_service_type

Definition at line 434 of file reqh.c.

◆ m0_ha_entrypoint_service_type

struct m0_reqh_service_type m0_ha_entrypoint_service_type

Definition at line 135 of file entrypoint.c.

◆ m0_ha_link_service_type

struct m0_reqh_service_type m0_ha_link_service_type

Definition at line 263 of file link_service.c.

◆ m0_reqh_sm_conf

const struct m0_sm_conf m0_reqh_sm_conf
static
Initial value:
= {
.scf_name = "Request Handler States",
.scf_nr_states = ARRAY_SIZE(m0_reqh_sm_descr),
.scf_state = m0_reqh_sm_descr,
}
static struct m0_sm_state_descr m0_reqh_sm_descr[]
Definition: reqh.c:97
#define ARRAY_SIZE(a)
Definition: misc.h:45

Request handler state machine configuration.

Definition at line 130 of file reqh.c.

◆ m0_reqh_sm_descr

struct m0_sm_state_descr m0_reqh_sm_descr[]
static
Initial value:
= {
.sd_name = "Init",
.sd_allowed = M0_BITS(M0_REQH_ST_NORMAL,
},
.sd_flags = 0,
.sd_name = "Normal",
.sd_allowed = M0_BITS(M0_REQH_ST_DRAIN,
},
.sd_flags = 0,
.sd_name = "Drain",
},
.sd_flags = 0,
.sd_name = "ServicesStop",
.sd_allowed = M0_BITS(M0_REQH_ST_STOPPED)
},
.sd_flags = M0_SDF_TERMINAL,
.sd_name = "Stopped",
.sd_allowed = 0
},
}
#define M0_BITS(...)
Definition: misc.h:236

Request handler state machine description

Definition at line 97 of file reqh.c.

◆ m0_rpc_service_type

struct m0_reqh_service_type m0_rpc_service_type

Definition at line 120 of file service.c.

◆ rb

struct reqh_ut_balloc rb
Initial value:
= {
.rb_next = 0,
.rb_ballroom = {
.ab_ops = &reqh_ut_balloc_ops
}
}
static const struct m0_ad_balloc_ops reqh_ut_balloc_ops
Definition: reqh_fom_ut.c:151

Definition at line 159 of file reqh_fom_ut.c.

◆ reqh

struct m0_reqh reqh
static

Global reqh object

Definition at line 85 of file reqh_fom_ut.c.

◆ reqh_ut

struct m0_ut_suite reqh_ut
Initial value:
= {
.ts_name = "reqh-ut",
.ts_tests = {
{ "reqh", test_reqh },
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
void test_reqh(void)
Definition: reqh_fom_ut.c:409

Definition at line 472 of file reqh_fom_ut.c.

◆ reqh_ut_balloc_ops

const struct m0_ad_balloc_ops reqh_ut_balloc_ops
static
Initial value:
= {
.bo_init = reqh_ut_balloc_init,
.bo_fini = reqh_ut_balloc_fini,
.bo_alloc = reqh_ut_balloc_alloc,
.bo_free = reqh_ut_balloc_free,
.bo_reserve_extent = reqh_ut_reserve_extent,
}
static int reqh_ut_balloc_alloc(struct m0_ad_balloc *ballroom, struct m0_dtx *tx, m0_bcount_t count, struct m0_ext *out, uint64_t alloc_zone)
Definition: reqh_fom_ut.c:122
static void reqh_ut_balloc_fini(struct m0_ad_balloc *ballroom)
Definition: reqh_fom_ut.c:115
static int reqh_ut_reserve_extent(struct m0_ad_balloc *ballroom, struct m0_be_tx *tx, struct m0_ext *ext, uint64_t alloc_zone)
Definition: reqh_fom_ut.c:144
static int reqh_ut_balloc_init(struct m0_ad_balloc *ballroom, struct m0_be_seg *db, uint32_t bshift, m0_bindex_t container_size, m0_bcount_t groupsize, m0_bcount_t spare_reserve)
Definition: reqh_fom_ut.c:102
static int reqh_ut_balloc_free(struct m0_ad_balloc *ballroom, struct m0_dtx *tx, struct m0_ext *ext)
Definition: reqh_fom_ut.c:138

Definition at line 151 of file reqh_fom_ut.c.

◆ reqh_ut_service

struct m0_reqh_service* reqh_ut_service
static

Definition at line 79 of file reqh_fom_ut.c.

◆ rqsvc_bob

struct m0_bob_type rqsvc_bob
static

Definition at line 70 of file reqh.c.

◆ sdom

struct m0_stob_domain* sdom
static

Definition at line 73 of file reqh_fom_ut.c.

◆ srv_cob_dom_id

struct m0_cob_domain_id srv_cob_dom_id
static

Definition at line 75 of file reqh_fom_ut.c.

◆ srv_mdstore

struct m0_mdstore srv_mdstore
static

Definition at line 74 of file reqh_fom_ut.c.

◆ srv_rpc_mach

struct m0_rpc_machine srv_rpc_mach
static

Definition at line 76 of file reqh_fom_ut.c.

◆ ut_be

struct m0_be_ut_backend ut_be
static

Definition at line 77 of file reqh_fom_ut.c.

◆ ut_seg

struct m0_be_ut_seg ut_seg
static

Definition at line 78 of file reqh_fom_ut.c.