Motr  M0
sd_release_fom.c File Reference
#include "lib/trace.h"
#include "lib/memory.h"
#include "ut/ut.h"
#include "rpc/rpc_machine_internal.h"
#include "rpc/session_internal.h"
#include "rpc/item_internal.h"
#include "fdmi/fdmi.h"
#include "fdmi/service.h"
#include "fdmi/source_dock_internal.h"
#include "fdmi/fops.h"
#include "fdmi/ut/sd_common.h"
Include dependency graph for sd_release_fom.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_FDMI
 

Functions

 M0_TL_DESCR_DECLARE (fdmi_record_inflight, M0_EXTERN)
 
 M0_TL_DECLARE (fdmi_record_inflight, M0_EXTERN, struct m0_fdmi_src_rec)
 
static int test_packet_ready (struct m0_rpc_packet *p)
 
static int test_fs_node_eval (struct m0_fdmi_src_rec *src_rec, struct m0_fdmi_flt_var_node *value_desc, struct m0_fdmi_flt_operand *value)
 
static int test_fs_encode (struct m0_fdmi_src_rec *src_rec, struct m0_buf *buf)
 
static void test_fs_get (struct m0_fdmi_src_rec *src_rec)
 
static void test_fs_put (struct m0_fdmi_src_rec *src_rec)
 
static struct m0_fdmi_srcsrc_alloc ()
 
static void my_fop_release (struct m0_ref *ref)
 
int imitate_release_fop_recv (struct test_rpc_env *env)
 
static void g_src_rec_free (struct m0_ref *ref)
 
void fdmi_sd_release_fom (void)
 

Variables

static struct test_rpc_env g_rpc_env
 
static struct m0_rpc_packetg_sent_rpc_packet
 
static const struct m0_rpc_frm_ops test_frm_ops
 
static struct m0_semaphore g_sem
 
static struct m0_semaphore g_sem2
 
static struct m0_semaphore g_sem3
 
static struct m0_uint128 rec_id_to_release = M0_UINT128(0xDEAD, 0xBEEF)
 
static struct m0_fdmi_src_rec g_src_rec
 
static int g_refcount
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_FDMI

Definition at line 23 of file sd_release_fom.c.

Function Documentation

◆ fdmi_sd_release_fom()

void fdmi_sd_release_fom ( void  )

Wait until record is processed and released. Must happen within 10 sec, otherwise we consider it a failure.

Wait until record is sent over RPC. Must happen within 10 sec, otherwise we consider it a failure.

Definition at line 170 of file sd_release_fom.c.

Here is the call graph for this function:

◆ g_src_rec_free()

static void g_src_rec_free ( struct m0_ref ref)
static

Definition at line 167 of file sd_release_fom.c.

Here is the caller graph for this function:

◆ imitate_release_fop_recv()

int imitate_release_fop_recv ( struct test_rpc_env env)

Definition at line 123 of file sd_release_fom.c.

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

◆ M0_TL_DECLARE()

M0_TL_DECLARE ( fdmi_record_inflight  ,
M0_EXTERN  ,
struct m0_fdmi_src_rec   
)

◆ M0_TL_DESCR_DECLARE()

M0_TL_DESCR_DECLARE ( fdmi_record_inflight  ,
M0_EXTERN   
)

◆ my_fop_release()

static void my_fop_release ( struct m0_ref ref)
static

Definition at line 117 of file sd_release_fom.c.

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

◆ src_alloc()

static struct m0_fdmi_src* src_alloc ( )
static

Definition at line 94 of file sd_release_fom.c.

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

◆ test_fs_encode()

static int test_fs_encode ( struct m0_fdmi_src_rec src_rec,
struct m0_buf buf 
)
static

Definition at line 68 of file sd_release_fom.c.

Here is the caller graph for this function:

◆ test_fs_get()

static void test_fs_get ( struct m0_fdmi_src_rec src_rec)
static

Definition at line 75 of file sd_release_fom.c.

Here is the caller graph for this function:

◆ test_fs_node_eval()

static int test_fs_node_eval ( struct m0_fdmi_src_rec src_rec,
struct m0_fdmi_flt_var_node value_desc,
struct m0_fdmi_flt_operand value 
)
static

Definition at line 59 of file sd_release_fom.c.

Here is the caller graph for this function:

◆ test_fs_put()

static void test_fs_put ( struct m0_fdmi_src_rec src_rec)
static

Calling of this function is a sign that FDMI finished release FOP handling.

Definition at line 80 of file sd_release_fom.c.

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

◆ test_packet_ready()

int test_packet_ready ( struct m0_rpc_packet p)
static

Definition at line 109 of file sd_release_fom.c.

Here is the call graph for this function:

Variable Documentation

◆ g_refcount

int g_refcount
static

Definition at line 57 of file sd_release_fom.c.

◆ g_rpc_env

struct test_rpc_env g_rpc_env
static

Definition at line 42 of file sd_release_fom.c.

◆ g_sem

struct m0_semaphore g_sem
static

Definition at line 52 of file sd_release_fom.c.

◆ g_sem2

struct m0_semaphore g_sem2
static

Definition at line 53 of file sd_release_fom.c.

◆ g_sem3

struct m0_semaphore g_sem3
static

Definition at line 54 of file sd_release_fom.c.

◆ g_sent_rpc_packet

struct m0_rpc_packet* g_sent_rpc_packet
static

Definition at line 43 of file sd_release_fom.c.

◆ g_src_rec

struct m0_fdmi_src_rec g_src_rec
static

Definition at line 56 of file sd_release_fom.c.

◆ rec_id_to_release

struct m0_uint128 rec_id_to_release = M0_UINT128(0xDEAD, 0xBEEF)
static

Definition at line 55 of file sd_release_fom.c.

◆ test_frm_ops

const struct m0_rpc_frm_ops test_frm_ops
static
Initial value:
= {
.fo_packet_ready = test_packet_ready,
}
static int test_packet_ready(struct m0_rpc_packet *p)

Definition at line 47 of file sd_release_fom.c.