Motr  M0
log_discard.c File Reference
#include "lib/trace.h"
#include "be/log_discard.h"
#include "lib/errno.h"
#include "lib/ext.h"
#include "lib/locality.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "sm/sm.h"
#include "be/op.h"
#include "be/pool.h"
#include "motr/magic.h"
Include dependency graph for log_discard.c:

Go to the source code of this file.

Data Structures

struct  m0_be_log_discard_item
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_BE
 

Enumerations

enum  be_log_discard_item_state {
  LDI_INIT, LDI_STARTING, LDI_FINISHED, LDI_SYNCED,
  LDI_DISCARDED
}
 

Functions

 M0_TL_DESCR_DEFINE (ld_start, "m0_be_log_discard::lds_start_q", static, struct m0_be_log_discard_item, ldi_start_link, ldi_magic, M0_BE_LOG_DISCARD_MAGIC, M0_BE_LOG_DISCARD_HEAD_MAGIC)
 
 M0_TL_DEFINE (ld_start, static, struct m0_be_log_discard_item)
 
 M0_BE_POOL_DESCR_DEFINE (ld, "m0_be_log_discard::lds_item_pool", static, struct m0_be_log_discard_item, ldi_pool_item, ldi_pool_magic, M0_BE_LOG_DISCARD_POOL_MAGIC)
 
 M0_BE_POOL_DEFINE (ld, static, struct m0_be_log_discard_item)
 
static void be_log_discard_sync_done_cb (struct m0_be_op *op, void *param)
 
static void be_log_discard_timer_start (struct m0_be_log_discard *ld)
 
static void be_log_discard_timer_cancel (struct m0_be_log_discard *ld)
 
M0_INTERNAL int m0_be_log_discard_init (struct m0_be_log_discard *ld, struct m0_be_log_discard_cfg *ld_cfg)
 
static void be_log_discard_wait (struct m0_be_log_discard *ld)
 
M0_INTERNAL void m0_be_log_discard_fini (struct m0_be_log_discard *ld)
 
static void be_log_discard_lock (struct m0_be_log_discard *ld)
 
static void be_log_discard_unlock (struct m0_be_log_discard *ld)
 
static bool be_log_discard_is_locked (struct m0_be_log_discard *ld)
 
static void be_log_discard_flush_finished (struct m0_be_log_discard *ld)
 
static void be_log_discard_check_sync (struct m0_be_log_discard *ld, bool force)
 
static void be_log_discard_item_discard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi)
 
static void be_log_discard_item_trydiscard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi)
 
static void be_log_discard_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void be_log_discard_timer_cb (struct m0_sm_timer *timer)
 
static int be_log_discard_timer_start_loc (void *param)
 
static int be_log_discard_timer_cancel_loc (void *param)
 
M0_INTERNAL void m0_be_log_discard_sync (struct m0_be_log_discard *ld)
 
M0_INTERNAL void m0_be_log_discard_flush (struct m0_be_log_discard *ld, struct m0_be_op *op)
 
M0_INTERNAL void m0_be_log_discard_item_starting (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi)
 
M0_INTERNAL void m0_be_log_discard_item_finished (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi)
 
static void be_log_discard_item_reset (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi)
 
M0_INTERNAL void m0_be_log_discard_item_get (struct m0_be_log_discard *ld, struct m0_be_op *op, struct m0_be_log_discard_item **ldi)
 
M0_INTERNAL void m0_be_log_discard_item_put (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi)
 
M0_INTERNAL void m0_be_log_discard_item_user_data_set (struct m0_be_log_discard_item *ldi, void *data)
 
M0_INTERNAL void * m0_be_log_discard_item_user_data (struct m0_be_log_discard_item *ldi)
 
M0_INTERNAL void m0_be_log_discard_item_ext_set (struct m0_be_log_discard_item *ldi, struct m0_ext *ext)
 
M0_INTERNAL struct m0_extm0_be_log_discard_item_ext (struct m0_be_log_discard_item *ldi)