Motr  M0
fol.c File Reference
#include "lib/arith.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/misc.h"
#include "lib/vec.h"
#include "motr/magic.h"
#include "rpc/rpc_opcodes.h"
#include "fol/fol.h"
#include "fol/fol_private.h"
#include "fol/fol_xc.h"
#include "fop/fop.h"
#include "fop/fop_xc.h"
#include "lib/trace.h"
Include dependency graph for fol.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_FOL
 
#define FRAG_HEADER_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_fol_frag_header_xc, ptr)
 
#define FRAG_XCODE_OBJ(r)
 

Enumerations

enum  { FOL_FRAG_TYPE_MAX = 128, PART_TYPE_START_INDEX = 1 }
 

Functions

 M0_TL_DESCR_DEFINE (m0_rec_frag, "fol record fragment", M0_INTERNAL, struct m0_fol_frag, rp_link, rp_magic, M0_FOL_FRAG_LINK_MAGIC, M0_FOL_FRAG_HEAD_MAGIC)
 
 M0_TL_DEFINE (m0_rec_frag, M0_INTERNAL, struct m0_fol_frag)
 
static size_t fol_rec_header_pack_size (struct m0_fol_rec_header *h)
 
M0_INTERNAL void m0_fol_init (struct m0_fol *fol)
 
M0_INTERNAL void m0_fol_fini (struct m0_fol *fol)
 
M0_INTERNAL void m0_fol_rec_init (struct m0_fol_rec *rec, struct m0_fol *fol)
 
M0_INTERNAL void m0_fol_rec_fini (struct m0_fol_rec *rec)
 
M0_INTERNAL bool m0_fol_rec_invariant (const struct m0_fol_rec *rec)
 
M0_INTERNAL void m0_fol_frag_init (struct m0_fol_frag *frag, void *data, const struct m0_fol_frag_type *type)
 
M0_INTERNAL void m0_fol_frag_fini (struct m0_fol_frag *frag)
 
M0_INTERNAL int m0_fols_init (void)
 
M0_INTERNAL void m0_fols_fini (void)
 
M0_INTERNAL int m0_fol_frag_type_register (struct m0_fol_frag_type *type)
 
M0_INTERNAL void m0_fol_frag_type_deregister (struct m0_fol_frag_type *type)
 
static const struct m0_fol_frag_typefol_frag_type_lookup (uint32_t index)
 
static size_t fol_record_pack_size (struct m0_fol_rec *rec)
 
static int fol_rec_encdec (struct m0_fol_rec *rec, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
 
static int fol_record_pack (struct m0_fol_rec *rec, struct m0_buf *buf)
 
M0_INTERNAL int m0_fol_rec_encode (struct m0_fol_rec *rec, struct m0_buf *at)
 
M0_INTERNAL int m0_fol_rec_decode (struct m0_fol_rec *rec, struct m0_buf *at)
 
int m0_fol_rec_to_str (struct m0_fol_rec *rec, char *str, int str_len)
 
M0_INTERNAL void m0_fol_frag_add (struct m0_fol_rec *rec, struct m0_fol_frag *frag)
 

Variables

static const struct m0_fol_frag_typerptypes [FOL_FRAG_TYPE_MAX]
 
static struct m0_mutex rptypes_lock
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_FOL

Definition at line 36 of file fol.c.