Motr  M0
log.h File Reference
#include "lib/mutex.h"
#include "lib/tlist.h"
#include "lib/types.h"
#include "be/fmt.h"
#include "be/log_store.h"
#include "be/log_sched.h"
#include "be/op.h"
#include "be/io.h"
#include "be/recovery.h"
#include "stob/io.h"
Include dependency graph for log.h:

Go to the source code of this file.

Data Structures

struct  m0_be_log_cfg
 
struct  m0_be_log
 
struct  m0_be_log_record
 
struct  m0_be_log_record_iter
 

Macros

#define __MOTR_BE_LOG_H__
 
#define BL_F
 
#define BL_P(log)   (log)->lg_current, (log)->lg_discarded, (log)->lg_free
 
#define BLR_F
 
#define BLR_P(record)
 

Typedefs

typedef void(* m0_be_log_got_space_cb_t) (struct m0_be_log *log)
 
typedef void(* m0_be_log_record_cb_t) (struct m0_be_log_record *record)
 
typedef void(* m0_be_log_full_cb_t) (struct m0_be_log *log)
 

Enumerations

enum  { M0_BE_LOG_RECORD_IO_NR_MAX = 2 }
 
enum  {
  M0_BE_LOG_LEVEL_INIT, M0_BE_LOG_LEVEL_LOG_SCHED, M0_BE_LOG_LEVEL_LOG_STORE, M0_BE_LOG_LEVEL_HEADER_PREINIT,
  M0_BE_LOG_LEVEL_HEADER, M0_BE_LOG_LEVEL_RECOVERY, M0_BE_LOG_LEVEL_ASSIGNS, M0_BE_LOG_LEVEL_READY
}
 

Functions

M0_INTERNAL void m0_be_log_module_setup (struct m0_be_log *log, struct m0_be_log_cfg *lg_cfg, bool create_mode)
 
M0_INTERNAL bool m0_be_log__invariant (struct m0_be_log *log)
 
M0_INTERNAL int m0_be_log_open (struct m0_be_log *log, struct m0_be_log_cfg *log_cfg)
 
M0_INTERNAL void m0_be_log_close (struct m0_be_log *log)
 
M0_INTERNAL int m0_be_log_create (struct m0_be_log *log, struct m0_be_log_cfg *log_cfg)
 
M0_INTERNAL void m0_be_log_destroy (struct m0_be_log *log)
 
M0_INTERNAL m0_bcount_t m0_be_log_reserved_size (struct m0_be_log *log, m0_bcount_t *lio_size, int lio_nr)
 
M0_INTERNAL void m0_be_log_record_init (struct m0_be_log_record *record, struct m0_be_log *log)
 
M0_INTERNAL void m0_be_log_record_fini (struct m0_be_log_record *record)
 
M0_INTERNAL void m0_be_log_record_reset (struct m0_be_log_record *record)
 
M0_INTERNAL void m0_be_log_record_assign (struct m0_be_log_record *record, struct m0_be_log_record_iter *iter, bool need_discard)
 
M0_INTERNAL void m0_be_log_record_ext (struct m0_be_log_record *record, struct m0_ext *ext)
 
M0_INTERNAL void m0_be_log_record_skip_discard (struct m0_be_log_record *record)
 
M0_INTERNAL void m0_be_log_record_discard (struct m0_be_log *log, m0_bcount_t size)
 
M0_INTERNAL int m0_be_log_record_io_create (struct m0_be_log_record *record, m0_bcount_t size_max)
 
M0_INTERNAL int m0_be_log_record_allocate (struct m0_be_log_record *record)
 
M0_INTERNAL void m0_be_log_record_deallocate (struct m0_be_log_record *record)
 
M0_INTERNAL void m0_be_log_record_io_size_set (struct m0_be_log_record *record, int index, m0_bcount_t size)
 
M0_INTERNAL void m0_be_log_record_io_prepare (struct m0_be_log_record *record, enum m0_stob_io_opcode opcode, m0_bcount_t size_reserved)
 
M0_INTERNAL struct m0_bufvecm0_be_log_record_io_bufvec (struct m0_be_log_record *record, int index)
 
M0_INTERNAL void m0_be_log_record_io_launch (struct m0_be_log_record *record, struct m0_be_op *op)
 
M0_INTERNAL m0_bindex_t m0_be_log_record_position (const struct m0_be_log_record *record)
 
M0_INTERNAL m0_bindex_t m0_be_log_record_discarded (const struct m0_be_log_record *record)
 
M0_INTERNAL int m0_be_log_reserve (struct m0_be_log *log, m0_bcount_t size)
 
M0_INTERNAL void m0_be_log_unreserve (struct m0_be_log *log, m0_bcount_t size)
 
M0_INTERNAL uint32_t m0_be_log_bshift (struct m0_be_log *log)
 
M0_INTERNAL void m0_be_log_header__set (struct m0_be_fmt_log_header *hdr, m0_bindex_t discarded, m0_bindex_t lsn, m0_bcount_t size)
 
M0_INTERNAL bool m0_be_log_header__is_eq (struct m0_be_fmt_log_header *hdr1, struct m0_be_fmt_log_header *hdr2)
 
M0_INTERNAL bool m0_be_log_header__repair (struct m0_be_fmt_log_header **hdrs, int nr, struct m0_be_fmt_log_header *out)
 
M0_INTERNAL int m0_be_log_header_read (struct m0_be_log *log, struct m0_be_fmt_log_header *log_hdr)
 
M0_INTERNAL int m0_be_log_record_iter_init (struct m0_be_log_record_iter *iter)
 
M0_INTERNAL void m0_be_log_record_iter_fini (struct m0_be_log_record_iter *iter)
 
M0_INTERNAL void m0_be_log_record_iter_copy (struct m0_be_log_record_iter *dest, struct m0_be_log_record_iter *src)
 
M0_INTERNAL int m0_be_log_record_initial (struct m0_be_log *log, struct m0_be_log_record_iter *curr)
 
M0_INTERNAL int m0_be_log_record_next (struct m0_be_log *log, const struct m0_be_log_record_iter *curr, struct m0_be_log_record_iter *next)
 
M0_INTERNAL int m0_be_log_record_prev (struct m0_be_log *log, const struct m0_be_log_record_iter *curr, struct m0_be_log_record_iter *prev)
 
M0_INTERNAL bool m0_be_fmt_log_record_header__invariant (struct m0_be_fmt_log_record_header *header, struct m0_be_log *log)
 
M0_INTERNAL bool m0_be_log_recovery_record_available (struct m0_be_log *log)
 
M0_INTERNAL void m0_be_log_recovery_record_get (struct m0_be_log *log, struct m0_be_log_record_iter *iter)
 
M0_INTERNAL m0_bindex_t m0_be_log_recovery_discarded (struct m0_be_log *log)
 
M0_INTERNAL bool m0_be_log_contains_stob (struct m0_be_log *log, const struct m0_stob_id *stob_id)
 

Macro Definition Documentation

◆ __MOTR_BE_LOG_H__

#define __MOTR_BE_LOG_H__

Definition at line 27 of file log.h.