25 #ifndef __MOTR_FOL_FOL_H__ 26 #define __MOTR_FOL_FOL_H__ 101 #include "fid/fid_xc.h" 102 #include "dtm/dtm_update_xc.h" 324 #define M0_FOL_FRAG_TYPE_DECLARE(frag, scope, undo, redo, \ 325 undo_cred, redo_cred) \ 326 scope struct m0_fol_frag_type frag ## _type; \ 327 static const struct m0_fol_frag_ops frag ## _ops = { \ 328 .rpo_type = &frag ## _type, \ 331 .rpo_undo_credit = undo_cred, \ 332 .rpo_redo_credit = redo_cred, \ 334 static void frag ## _ops_init(struct m0_fol_frag *frag) \ 336 frag->rp_ops = &frag ## _ops; \ 338 static const struct m0_fol_frag_type_ops frag ## _type_ops = { \ 339 .rpto_rec_frag_init = frag ##_ops_init \ 342 #define M0_FOL_FRAG_TYPE_XC_OPS(name, frag_xc, frag_type_ops) \ 343 (struct m0_fol_frag_type) { \ 345 .rpt_xt = (frag_xc), \ 346 .rpt_ops = (frag_type_ops) \ 349 #define M0_FOL_FRAG_TYPE_INIT(frag, name) \ 350 frag ## _type = M0_FOL_FRAG_TYPE_XC_OPS(name, frag ## _xc, \
int(* rpo_redo)(struct m0_fol_frag *frag, struct m0_be_tx *tx)
M0_INTERNAL void m0_fol_fini(struct m0_fol *fol)
struct m0_fol_rec_header fr_header
int(* rpo_undo)(struct m0_fol_frag *frag, struct m0_be_tx *tx)
M0_INTERNAL void m0_fol_rec_fini(struct m0_fol_rec *rec)
const struct m0_fol_frag_ops * rp_ops
M0_INTERNAL int m0_fol_frag_type_register(struct m0_fol_frag_type *type)
M0_TL_DECLARE(m0_rec_frag, M0_INTERNAL, struct m0_fol_frag)
M0_INTERNAL void m0_fol_frag_init(struct m0_fol_frag *frag, void *data, const struct m0_fol_frag_type *type)
void(* rpo_undo_credit)(const struct m0_fol_frag *frag, struct m0_be_tx_credit *accum)
const struct m0_fol_frag_type * rpo_type
M0_INTERNAL void m0_fols_fini(void)
const struct m0_fol_frag_type_ops * rpt_ops
M0_INTERNAL void m0_fol_rec_init(struct m0_fol_rec *rec, struct m0_fol *fol)
int m0_fol_rec_to_str(struct m0_fol_rec *rec, char *str, int str_len)
const struct m0_xcode_type * rpt_xt
M0_INTERNAL void m0_fol_init(struct m0_fol *fol)
struct m0_fdmi_src_rec fr_fdmi_rec
M0_BASSERT(M0_IS_8ALIGNED(sizeof(struct m0_fol_rec_header)))
struct m0_epoch_id * fr_epoch
M0_INTERNAL bool m0_fol_rec_invariant(const struct m0_fol_rec *rec)
M0_TL_DESCR_DECLARE(m0_rec_frag, M0_EXTERN)
static bool at(struct ff2c_context *ctx, char c)
struct m0_fol_update_ref * fr_sibling
M0_INTERNAL void m0_fol_frag_fini(struct m0_fol_frag *frag)
M0_INTERNAL int m0_fols_init(void)
enum m0_xcode_what rp_flag
M0_INTERNAL void m0_fol_frag_add(struct m0_fol_rec *rec, struct m0_fol_frag *frag)
M0_INTERNAL void m0_fol_frag_type_deregister(struct m0_fol_frag_type *type)
#define M0_IS_8ALIGNED(val)
void(* rpto_rec_frag_init)(struct m0_fol_frag *frag)
void(* rpo_redo_credit)(const struct m0_fol_frag *frag, struct m0_be_tx_credit *accum)
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)