Motr  M0
log_store.c File Reference
#include "be/log_store.h"
#include "lib/trace.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "be/fmt.h"
#include "be/log.h"
#include "be/op.h"
#include "be/io.h"
#include "module/instance.h"
#include "stob/stob.h"
#include "stob/domain.h"
Include dependency graph for log_store.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_BE
 

Enumerations

enum  { M0_BE_LOG_STORE_WRITE_SIZE_MAX = 4 * 1024 * 1024 }
 

Functions

static int be_log_store_buf_alloc_aligned (struct m0_be_log_store *ls, struct m0_buf *buf, m0_bcount_t size)
 
static void be_log_store_buf_free_aligned (struct m0_be_log_store *ls, struct m0_buf *buf)
 
M0_INTERNAL bool m0_be_log_store__invariant (struct m0_be_log_store *ls)
 
static int be_log_store_zero (struct m0_be_log_store *ls, m0_bcount_t ls_size)
 
static struct m0_be_log_storebe_log_store_module2store (struct m0_module *module)
 
static bool be_log_store_header_validate (struct m0_be_fmt_log_store_header *header, uint64_t alignment)
 
static int be_log_store_rbuf_alloc (struct m0_be_log_store *ls, struct m0_buf *buf)
 
static void be_log_store_rbuf_free (struct m0_be_log_store *ls, struct m0_buf *buf)
 
static int be_log_store_rbuf_init_fini_index (struct m0_be_log_store *ls, int i, bool init)
 
static void be_log_store_rbuf_fini_nr (struct m0_be_log_store *ls, int nr)
 
static void be_log_store_rbuf_fini (struct m0_be_log_store *ls)
 
static int be_log_store_rbuf_init (struct m0_be_log_store *ls)
 
static void be_log_store_rbuf_arr_free (struct m0_be_log_store *ls)
 
static int be_log_store_level_enter (struct m0_module *module)
 
static void be_log_store_level_leave (struct m0_module *module)
 
M0_INTERNAL void m0_be_log_store_module_setup (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg, bool create_mode)
 
static void be_log_store_module_fini (struct m0_be_log_store *ls, bool destroy_mode)
 
static int be_log_store_module_init (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg, bool create_mode)
 
M0_INTERNAL int m0_be_log_store_open (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg)
 
M0_INTERNAL int m0_be_log_store_create (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg)
 
M0_INTERNAL void m0_be_log_store_destroy (struct m0_be_log_store *ls)
 
M0_INTERNAL void m0_be_log_store_close (struct m0_be_log_store *ls)
 
M0_INTERNAL uint32_t m0_be_log_store_bshift (struct m0_be_log_store *ls)
 
M0_INTERNAL m0_bcount_t m0_be_log_store_buf_size (struct m0_be_log_store *ls)
 
M0_INTERNAL void m0_be_log_store_io_credit (struct m0_be_log_store *ls, struct m0_be_io_credit *accum)
 
M0_INTERNAL int m0_be_log_store_io_window (struct m0_be_log_store *ls, m0_bindex_t offset, m0_bcount_t *length)
 
M0_INTERNAL void m0_be_log_store_io_discard (struct m0_be_log_store *ls, m0_bindex_t offset, struct m0_be_op *op)
 
static m0_bindex_t be_log_store_phys_addr (struct m0_be_log_store *ls, m0_bindex_t position)
 
M0_INTERNAL void m0_be_log_store_io_translate (struct m0_be_log_store *ls, m0_bindex_t position, struct m0_be_io *bio)
 
M0_INTERNAL struct m0_bufm0_be_log_store_rbuf_write_buf (struct m0_be_log_store *ls)
 
M0_INTERNAL struct m0_bufm0_be_log_store_rbuf_read_buf_first (struct m0_be_log_store *ls, unsigned *iter)
 
M0_INTERNAL struct m0_bufm0_be_log_store_rbuf_read_buf_next (struct m0_be_log_store *ls, unsigned *iter)
 
static struct m0_be_log_iobe_log_store_rbuf_io_and_op (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type, struct m0_be_op **op, unsigned index)
 
M0_INTERNAL struct m0_be_log_iom0_be_log_store_rbuf_io_first (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type, struct m0_be_op **op, unsigned *iter)
 
M0_INTERNAL struct m0_be_log_iom0_be_log_store_rbuf_io_next (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type, struct m0_be_op **op, unsigned *iter)
 
M0_INTERNAL void m0_be_log_store_rbuf_io_reset (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type)
 
M0_INTERNAL bool m0_be_log_store_overwrites (struct m0_be_log_store *ls, m0_bindex_t index, m0_bcount_t size, m0_bindex_t position)
 
M0_INTERNAL bool m0_be_log_store_contains_stob (struct m0_be_log_store *ls, const struct m0_stob_id *stob_id)
 

Variables

static const struct m0_modlev be_log_store_levels []
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_BE

Definition at line 25 of file log_store.c.