Motr  M0
isc_service.c File Reference
#include "lib/trace.h"
#include "reqh/reqh_service.h"
#include "reqh/reqh.h"
#include "iscservice/isc_service.h"
#include "iscservice/isc_fops.h"
#include "lib/hash.h"
#include "module/instance.h"
#include "lib/memory.h"
#include "fid/fid.h"
#include "motr/magic.h"
#include "iscservice/isc.h"
Include dependency graph for isc_service.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_ISCS
 

Enumerations

enum  { ISC_HT_BUCKET_NR = 100 }
 

Functions

static int iscs_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
static void iscs_fini (struct m0_reqh_service *service)
 
static int iscs_start (struct m0_reqh_service *service)
 
static void iscs_stop (struct m0_reqh_service *service)
 
static bool comp_key_eq (const void *key1, const void *key2)
 
static uint64_t comp_hash_func (const struct m0_htable *htable, const void *k)
 
 M0_HT_DESCR_DEFINE (m0_isc, "Hash table for compute functions", M0_INTERNAL, struct m0_isc_comp, ic_hlink, ic_magic, M0_ISC_COMP_MAGIC, M0_ISC_TLIST_HEAD_MAGIC, ic_fid, comp_hash_func, comp_key_eq)
 
 M0_HT_DEFINE (m0_isc, M0_INTERNAL, struct m0_isc_comp, struct m0_fid)
 
M0_INTERNAL struct m0_htablem0_isc_htable_get (void)
 
M0_INTERNAL int m0_isc_mod_init (void)
 
M0_INTERNAL void m0_isc_mod_fini (void)
 
M0_INTERNAL int m0_iscs_register (void)
 
M0_INTERNAL void m0_iscs_unregister (void)
 

Variables

enum { ... }  M0_XCA_DOMAIN
 
static const struct m0_reqh_service_type_ops iscs_type_ops
 
static const struct m0_reqh_service_ops iscs_ops
 
struct m0_reqh_service_type m0_iscs_type
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_ISCS

Definition at line 23 of file isc_service.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ISC_HT_BUCKET_NR 

Definition at line 61 of file isc_service.c.

Function Documentation

◆ comp_hash_func()

static uint64_t comp_hash_func ( const struct m0_htable htable,
const void *  k 
)
static

Definition at line 49 of file isc_service.c.

Here is the call graph for this function:

◆ comp_key_eq()

static bool comp_key_eq ( const void *  key1,
const void *  key2 
)
static

Definition at line 44 of file isc_service.c.

Here is the call graph for this function:

◆ iscs_allocate()

static int iscs_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Definition at line 125 of file isc_service.c.

Here is the call graph for this function:

◆ iscs_fini()

static void iscs_fini ( struct m0_reqh_service service)
static

Definition at line 169 of file isc_service.c.

Here is the call graph for this function:

◆ iscs_start()

static int iscs_start ( struct m0_reqh_service service)
static

Definition at line 144 of file isc_service.c.

Here is the call graph for this function:

◆ iscs_stop()

static void iscs_stop ( struct m0_reqh_service service)
static

Definition at line 156 of file isc_service.c.

Here is the call graph for this function:

◆ M0_HT_DEFINE()

M0_HT_DEFINE ( m0_isc  ,
M0_INTERNAL  ,
struct m0_isc_comp  ,
struct m0_fid   
)

◆ M0_HT_DESCR_DEFINE()

M0_HT_DESCR_DEFINE ( m0_isc  ,
"Hash table for compute functions"  ,
M0_INTERNAL  ,
struct m0_isc_comp  ,
ic_hlink  ,
ic_magic  ,
M0_ISC_COMP_MAGIC  ,
M0_ISC_TLIST_HEAD_MAGIC  ,
ic_fid  ,
comp_hash_func  ,
comp_key_eq   
)

◆ m0_isc_htable_get()

M0_INTERNAL struct m0_htable* m0_isc_htable_get ( void  )

Returns the hash-table of computations stored with m0 instance.

Definition at line 83 of file isc_service.c.

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

◆ m0_isc_mod_fini()

M0_INTERNAL void m0_isc_mod_fini ( void  )

Definition at line 99 of file isc_service.c.

Here is the call graph for this function:

◆ m0_isc_mod_init()

M0_INTERNAL int m0_isc_mod_init ( void  )

Creates the hash-table of computations in m0 instance.

Definition at line 88 of file isc_service.c.

Here is the call graph for this function:

◆ m0_iscs_register()

M0_INTERNAL int m0_iscs_register ( void  )

Definition at line 104 of file isc_service.c.

Here is the call graph for this function:

◆ m0_iscs_unregister()

M0_INTERNAL void m0_iscs_unregister ( void  )

Definition at line 119 of file isc_service.c.

Here is the call graph for this function:

Variable Documentation

◆ iscs_ops

const struct m0_reqh_service_ops iscs_ops
static
Initial value:
= {
.rso_start = iscs_start,
.rso_stop = iscs_stop,
.rso_fini = iscs_fini
}
static void iscs_stop(struct m0_reqh_service *service)
Definition: isc_service.c:156
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
Definition: reqh_service.c:601
static void iscs_fini(struct m0_reqh_service *service)
Definition: isc_service.c:169
static int iscs_start(struct m0_reqh_service *service)
Definition: isc_service.c:144

Definition at line 69 of file isc_service.c.

◆ iscs_type_ops

const struct m0_reqh_service_type_ops iscs_type_ops
static
Initial value:
= {
.rsto_service_allocate = iscs_allocate
}
static int iscs_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: isc_service.c:125

Definition at line 65 of file isc_service.c.

◆ m0_iscs_type

struct m0_reqh_service_type m0_iscs_type
Initial value:
= {
.rst_name = "M0_CST_ISCS",
.rst_ops = &iscs_type_ops,
.rst_level = M0_RS_LEVEL_NORMAL,
.rst_typecode = M0_CST_ISCS,
}
static const struct m0_reqh_service_type_ops iscs_type_ops
Definition: isc_service.c:65

Definition at line 76 of file isc_service.c.

◆ M0_XCA_DOMAIN

enum { ... } M0_XCA_DOMAIN