Motr  M0
reqh_fom_ut.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <err.h>
#include "lib/memory.h"
#include "net/net.h"
#include "fop/fop.h"
#include "reqh/reqh.h"
#include "stob/stob.h"
#include "stob/ad.h"
#include "net/lnet/lnet.h"
#include "rpc/rpc.h"
#include "fop/fop_item_type.h"
#include "rpc/item.h"
#include "rpc/rpc_internal.h"
#include "fop/fom_generic.h"
#include "fop/fom_generic_xc.h"
#include "reqh/ut/io_fop_xc.h"
#include "reqh/ut/io_fop.h"
#include "rpc/rpc_opcodes.h"
#include "rpc/rpclib.h"
#include "balloc/balloc.h"
#include "mdstore/mdstore.h"
#include "fdmi/fdmi.h"
#include "ut/ut.h"
#include "ut/be.h"
Include dependency graph for reqh_fom_ut.c:

Go to the source code of this file.

Data Structures

struct  reqh_ut_balloc
 

Macros

#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  { CLIENT_COB_DOM_ID = 101, MAX_RPCS_IN_FLIGHT = 32, MAX_RETRIES = 5 }
 

Functions

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_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