Motr  M0
seg.h File Reference
#include "be/alloc.h"
#include "be/seg_dict.h"
#include "lib/tlist.h"
#include "lib/types.h"
Include dependency graph for seg.h:

Go to the source code of this file.

Data Structures

struct  m0_be_seg
 
struct  m0_be_seg_geom
 
struct  m0_be_reg
 

Macros

#define __MOTR_BE_SEG_H__
 
#define M0_BE_SEG_PG_PRESENT   0x8000000000000000ULL
 
#define M0_BE_SEG_PG_PIN_CNT_MASK   (~M0_BE_SEG_PG_PRESENT)
 
#define M0_BE_SEG_GEOM0
 
#define M0_BE_REG(seg, size, addr)
 
#define M0_BE_REG_PTR(seg, ptr)   M0_BE_REG((seg), sizeof *(ptr), (ptr))
 
#define M0_BE_REG_SEG(seg)   M0_BE_REG((seg), (seg)->bs_size, (seg)->bs_addr)
 

Enumerations

enum  m0_be_seg_states { M0_BSS_INIT, M0_BSS_OPENED, M0_BSS_CLOSED }
 
enum  {
  M0_BE_SEG_HEADER_OFFSET = 0ULL, M0_BE_SEG_READ_SIZE_MAX = 1ULL << 26, M0_BE_SEG_CORE_DUMP_LIMIT = 64ULL << 20, M0_BE_SEG_FAKE_ID = ~0,
  M0_BE_SEG_PAGE_SIZE = 1ULL << 12
}
 

Functions

struct m0_be_allocator_call_stat M0_XCA_DOMAIN (be)
 
M0_INTERNAL bool m0_be_seg_geom_eq (const struct m0_be_seg_geom *left, const struct m0_be_seg_geom *right)
 
M0_INTERNAL int m0_be_seg_create_multiple (struct m0_stob *stob, const struct m0_be_seg_geom *geom)
 
M0_INTERNAL void m0_be_seg_init (struct m0_be_seg *seg, struct m0_stob *stob, struct m0_be_domain *dom, uint64_t seg_id)
 
M0_INTERNAL void m0_be_seg_fini (struct m0_be_seg *seg)
 
M0_INTERNAL bool m0_be_seg__invariant (const struct m0_be_seg *seg)
 
M0_INTERNAL int m0_be_seg_open (struct m0_be_seg *seg)
 
M0_INTERNAL void m0_be_seg_close (struct m0_be_seg *seg)
 
M0_INTERNAL int m0_be_seg_create (struct m0_be_seg *seg, m0_bcount_t size, void *addr)
 
M0_INTERNAL int m0_be_seg_destroy (struct m0_be_seg *seg)
 
M0_INTERNAL bool m0_be_seg_contains (const struct m0_be_seg *seg, const void *addr)
 
M0_INTERNAL m0_bindex_t m0_be_seg_offset (const struct m0_be_seg *seg, const void *addr)
 
M0_INTERNAL m0_bcount_t m0_be_seg_reserved (const struct m0_be_seg *seg)
 
M0_INTERNAL struct m0_be_allocatorm0_be_seg_allocator (struct m0_be_seg *seg)
 
M0_INTERNAL m0_bindex_t m0_be_reg_offset (const struct m0_be_reg *reg)
 
M0_INTERNAL bool m0_be_reg_eq (const struct m0_be_reg *r1, const struct m0_be_reg *r2)
 
bool m0_be_reg__invariant (const struct m0_be_reg *reg)
 
M0_INTERNAL int m0_be_seg__read (struct m0_be_reg *reg, void *dst)
 
M0_INTERNAL int m0_be_seg__write (struct m0_be_reg *reg, void *src)
 
M0_INTERNAL int m0_be_reg__read (struct m0_be_reg *reg)
 
M0_INTERNAL int m0_be_reg__write (struct m0_be_reg *reg)
 
M0_INTERNAL unsigned long m0_be_reg_gen_idx (const struct m0_be_reg *reg)
 
M0_INTERNAL bool m0_be_seg_contains_stob (struct m0_be_seg *seg, const struct m0_stob_id *stob_id)
 

Variables

m0_bcount_t sg_size
 
void * sg_addr
 
m0_bcount_t sg_offset
 
uint64_t sg_id
 
uint64_t sg_gen
 
struct m0_be_reg M0_XCA_DOMAIN
 

Macro Definition Documentation

◆ __MOTR_BE_SEG_H__

#define __MOTR_BE_SEG_H__

Definition at line 25 of file seg.h.

Variable Documentation

◆ sg_addr

void* sg_addr

Definition at line 486 of file seg.h.

◆ sg_gen

uint64_t sg_gen

Generation identifier which is populated with epoch during mkfs.

Definition at line 490 of file seg.h.

◆ sg_id

uint64_t sg_id

Definition at line 488 of file seg.h.

◆ sg_offset

m0_bcount_t sg_offset

Definition at line 487 of file seg.h.

◆ sg_size

m0_bcount_t sg_size

Definition at line 485 of file seg.h.