Motr  M0
FDMI Source Dock public interface
Collaboration diagram for FDMI Source Dock public interface:

Data Structures

struct  m0_fdmi_src
 
struct  m0_fdmi_src_rec
 

Macros

#define M0_FDMI_SOURCE_POST_RECORD(_src_rec_ptr)   ((_src_rec_ptr)->fsr_src)->fs_record_post(_src_rec_ptr)
 

Functions

M0_INTERNAL int m0_fdmi_source_alloc (enum m0_fdmi_rec_type_id type_id, struct m0_fdmi_src **source)
 
M0_INTERNAL void m0_fdmi_source_free (struct m0_fdmi_src *source)
 
M0_INTERNAL int m0_fdmi_source_register (struct m0_fdmi_src *src)
 
M0_INTERNAL void m0_fdmi_source_deregister (struct m0_fdmi_src *src)
 
M0_INTERNAL void m0_fdmi_source_dock_init (struct m0_fdmi_src_dock *src_dock)
 
M0_INTERNAL void m0_fdmi_source_dock_fini (struct m0_fdmi_src_dock *src_dock)
 
M0_INTERNAL bool m0_fdmi__record_is_valid (struct m0_fdmi_src_rec *src_rec)
 

Detailed Description

See also
FDMI Functional Specification

Macro Definition Documentation

◆ M0_FDMI_SOURCE_POST_RECORD

#define M0_FDMI_SOURCE_POST_RECORD (   _src_rec_ptr)    ((_src_rec_ptr)->fsr_src)->fs_record_post(_src_rec_ptr)

Posts source data to FDMI

Parameters
_src_regPointer to registered FDMI source instance
See also
m0_fdmi_source_register()
Note
Important! Source implementation should increment reference counter (if it is supported by the source) for the posted FDMI record.

Definition at line 148 of file source_dock.h.

Function Documentation

◆ m0_fdmi__record_is_valid()

M0_INTERNAL bool m0_fdmi__record_is_valid ( struct m0_fdmi_src_rec src_rec)

Validates that the record is valid. Should be used in M0_ASSERT in every function that receives src_rec as input parameter.

Definition at line 121 of file source_dock.c.

Here is the caller graph for this function:

◆ m0_fdmi_source_alloc()

M0_INTERNAL int m0_fdmi_source_alloc ( enum m0_fdmi_rec_type_id  type_id,
struct m0_fdmi_src **  source 
)

Source structure allocation, along with wrapping context

Definition at line 285 of file source_dock.c.

Here is the caller graph for this function:

◆ m0_fdmi_source_deregister()

M0_INTERNAL void m0_fdmi_source_deregister ( struct m0_fdmi_src src)

Deregister FDMI source type.

Must ONLY be called during motr fini phase (from the _fini method of the corresponding source).

Marks the source as not registered; dock will no longer apply any filters to it, and will issue no more callbacks (e.g. on 'release record' coming from plugin dock).

Iteratest over all records from this source that are waiting for 'release' from plugins. Removes these records from internal dock's list, calls deinit for whatever runtime data it has stored in src_rec part. But it does NOT call fs_put or fs_end, so it's up to plugin to release these locks (which must be done after this deregister call).

Definition at line 337 of file source_dock.c.

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

◆ m0_fdmi_source_dock_fini()

M0_INTERNAL void m0_fdmi_source_dock_fini ( struct m0_fdmi_src_dock src_dock)

Deinitialize FDMI source dock instance

Definition at line 97 of file source_dock.c.

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

◆ m0_fdmi_source_dock_init()

M0_INTERNAL void m0_fdmi_source_dock_init ( struct m0_fdmi_src_dock src_dock)

Initialize FDMI source dock internals

Definition at line 85 of file source_dock.c.

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

◆ m0_fdmi_source_free()

M0_INTERNAL void m0_fdmi_source_free ( struct m0_fdmi_src source)

Source structure release, along with wrapping context

Definition at line 301 of file source_dock.c.

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

◆ m0_fdmi_source_register()

M0_INTERNAL int m0_fdmi_source_register ( struct m0_fdmi_src src)

Register FDMI source type. Should be called only once for each FDMI source type. This call provides source dock private API for posting record and obtaining new FDMI record id.

Todo:
Phase 2: Check that fdmi_rec_type_id exists

Definition at line 311 of file source_dock.c.

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