Motr  M0
rm_fops.c File Reference
#include "lib/trace.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "lib/finject.h"
#include "rpc/item.h"
#include "rpc/rpc_opcodes.h"
#include "rpc/rpc.h"
#include "rm/rm.h"
#include "rm/rm_fops.h"
#include "rm/rm_foms.h"
#include "rm/rm_fops_xc.h"
#include "rm/rm_service.h"
#include "rm/rm_internal.h"
Include dependency graph for rm_fops.c:

Go to the source code of this file.

Data Structures

struct  rm_out
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_RM
 

Functions

static void rm_reply_process (struct m0_rpc_item *item)
 
static void rm_borrow_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void rm_revoke_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void rm_cancel_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static int rm_out_create (struct rm_out **out, enum m0_rm_outgoing_type otype, struct m0_rm_remote *other, struct m0_rm_credit *credit)
 
static void rm_out_release (struct rm_out *out)
 
static void rm_fop_release (struct m0_ref *ref)
 
static void rm_out_destroy (struct rm_out *out)
 
static int fop_common_fill (struct rm_out *outreq, struct m0_rm_incoming *in, struct m0_rm_credit *credit, struct m0_cookie *cookie, struct m0_fop_type *fopt, size_t offset, void **data)
 
static int borrow_fop_fill (struct rm_out *outreq, struct m0_rm_incoming *in, struct m0_rm_credit *credit)
 
static int revoke_fop_fill (struct rm_out *outreq, struct m0_rm_incoming *in, struct m0_rm_loan *loan, struct m0_rm_remote *other, struct m0_rm_credit *credit)
 
static int cancel_fop_fill (struct rm_out *outreq, struct m0_rm_loan *loan)
 
static void outreq_fini (struct rm_out *outreq, int rc)
 
M0_INTERNAL void m0_rm_outgoing_send (struct m0_rm_outgoing *outgoing)
 
static void outgoing_queue (enum m0_rm_outgoing_type otype, struct m0_rm_owner *owner, struct rm_out *outreq, struct m0_rm_incoming *in, struct m0_rm_remote *other)
 
M0_INTERNAL int m0_rm_request_out (enum m0_rm_outgoing_type otype, struct m0_rm_incoming *in, struct m0_rm_loan *loan, struct m0_rm_credit *credit, struct m0_rm_remote *other)
 
M0_INTERNAL void m0_rm_fop_fini (void)
 
M0_INTERNAL int m0_rm_fop_init (void)
 

Variables

static const struct m0_rpc_item_ops rm_request_rpc_ops
 
struct m0_fop_type m0_rm_fop_borrow_fopt
 
struct m0_fop_type m0_rm_fop_borrow_rep_fopt
 
struct m0_sm_state_descr rm_req_phases []
 
struct m0_reqh_service_type m0_rpc_service_type
 
struct m0_fop_type m0_rm_fop_revoke_fopt
 
struct m0_fop_type m0_rm_fop_revoke_rep_fopt
 
struct m0_fop_type m0_rm_fop_cancel_fopt
 
const struct m0_fom_type_ops rm_borrow_fom_type_ops
 
const struct m0_sm_conf borrow_sm_conf
 
const struct m0_fom_type_ops rm_revoke_fom_type_ops
 
const struct m0_fom_type_ops rm_cancel_fom_type_ops
 
const struct m0_sm_conf canoke_sm_conf
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_RM

Definition at line 23 of file rm_fops.c.

Function Documentation

◆ borrow_fop_fill()

static int borrow_fop_fill ( struct rm_out outreq,
struct m0_rm_incoming in,
struct m0_rm_credit credit 
)
static

Definition at line 194 of file rm_fops.c.

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

◆ cancel_fop_fill()

static int cancel_fop_fill ( struct rm_out outreq,
struct m0_rm_loan loan 
)
static

Definition at line 243 of file rm_fops.c.

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

◆ fop_common_fill()

static int fop_common_fill ( struct rm_out outreq,
struct m0_rm_incoming in,
struct m0_rm_credit credit,
struct m0_cookie cookie,
struct m0_fop_type fopt,
size_t  offset,
void **  data 
)
static

Definition at line 152 of file rm_fops.c.

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

◆ m0_rm_outgoing_send()

M0_INTERNAL void m0_rm_outgoing_send ( struct m0_rm_outgoing outgoing)

Definition at line 273 of file rm_fops.c.

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

◆ m0_rm_request_out()

M0_INTERNAL int m0_rm_request_out ( enum m0_rm_outgoing_type  otype,
struct m0_rm_incoming in,
struct m0_rm_loan loan,
struct m0_rm_credit credit,
struct m0_rm_remote remote 
)

Constructs and sends out an outgoing request.

Allocates m0_rm_outgoing, adds a pin from "in" to the outgoing request. Constructs and sends an outgoing request fop. Arranges m0_rm_outgoing_complete() to be called on fop reply or timeout.

Definition at line 354 of file rm_fops.c.

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

◆ outgoing_queue()

static void outgoing_queue ( enum m0_rm_outgoing_type  otype,
struct m0_rm_owner owner,
struct rm_out outreq,
struct m0_rm_incoming in,
struct m0_rm_remote other 
)
static

Definition at line 324 of file rm_fops.c.

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

◆ outreq_fini()

static void outreq_fini ( struct rm_out outreq,
int  rc 
)
static

Definition at line 266 of file rm_fops.c.

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

◆ revoke_fop_fill()

static int revoke_fop_fill ( struct rm_out outreq,
struct m0_rm_incoming in,
struct m0_rm_loan loan,
struct m0_rm_remote other,
struct m0_rm_credit credit 
)
static

Definition at line 221 of file rm_fops.c.

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

◆ rm_borrow_ast()

static void rm_borrow_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 400 of file rm_fops.c.

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

◆ rm_cancel_ast()

static void rm_cancel_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 498 of file rm_fops.c.

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

◆ rm_fop_release()

static void rm_fop_release ( struct m0_ref ref)
static

Definition at line 129 of file rm_fops.c.

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

◆ rm_out_create()

static int rm_out_create ( struct rm_out **  out,
enum m0_rm_outgoing_type  otype,
struct m0_rm_remote other,
struct m0_rm_credit credit 
)
static

Definition at line 96 of file rm_fops.c.

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

◆ rm_out_destroy()

static void rm_out_destroy ( struct rm_out out)
static

Definition at line 144 of file rm_fops.c.

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

◆ rm_out_release()

static void rm_out_release ( struct rm_out out)
static

Definition at line 124 of file rm_fops.c.

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

◆ rm_reply_process()

static void rm_reply_process ( struct m0_rpc_item item)
static

Forward declaration.

Definition at line 526 of file rm_fops.c.

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

◆ rm_revoke_ast()

static void rm_revoke_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 461 of file rm_fops.c.

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

Variable Documentation

◆ rm_request_rpc_ops

const struct m0_rpc_item_ops rm_request_rpc_ops
static
Initial value:
= {
.rio_replied = rm_reply_process,
}
static void rm_reply_process(struct m0_rpc_item *item)
Definition: rm_fops.c:526

Definition at line 60 of file rm_fops.c.