22 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_STOB 38 #include "stob/stob_xc.h" 53 const struct m0_fid *stob_fid)
66 const struct m0_fid *stob_fid,
103 const struct m0_fid *stob_fid,
142 }
else if (
rc == -ENOENT)
145 return M0_RC(M0_IN(
rc, (0, -ENOENT)) ? 0 :
rc);
316 const struct m0_fid *stob_fid)
345 const struct m0_fid *dom_id,
369 m0_xc_stob_stob_init();
375 m0_xc_stob_stob_fini();
379 #undef M0_TRACE_SUBSYSTEM
M0_INTERNAL struct m0_stob_domain * m0_stob_dom_get(struct m0_stob *stob)
M0_INTERNAL void m0_stob_domain__stob_free(struct m0_stob_domain *dom, struct m0_stob *stob)
int(* sop_punch)(struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
void(* sop_destroy_credit)(struct m0_stob *stob, struct m0_be_tx_credit *accum)
M0_INTERNAL void m0_stob_cache_add(struct m0_stob_cache *cache, struct m0_stob *stob)
M0_INTERNAL int m0_stob_locate(struct m0_stob *stob)
M0_INTERNAL void m0_fid_tset(struct m0_fid *fid, uint8_t tid, uint64_t container, uint64_t key)
struct m0_fid si_domain_fid
const struct m0_stob_ops * so_ops
M0_INTERNAL int m0_stob_mod_init(void)
M0_INTERNAL bool m0_chan_has_waiters(struct m0_chan *chan)
#define M0_LOG(level,...)
M0_INTERNAL int m0_stob_find_by_key(struct m0_stob_domain *dom, const struct m0_fid *stob_fid, struct m0_stob **out)
struct m0_container container
void(* sdo_stob_free)(struct m0_stob_domain *dom, struct m0_stob *stob)
int(* sop_destroy)(struct m0_stob *stob, struct m0_dtx *dtx)
M0_INTERNAL uint8_t m0_fid_tget(const struct m0_fid *fid)
M0_INTERNAL const struct m0_fid * m0_stob_fid_get(struct m0_stob *stob)
struct m0_mutex so_ref_mutex
M0_INTERNAL void m0_stob__id_set(struct m0_stob *stob, const struct m0_fid *stob_fid)
M0_INTERNAL void m0_stob__cache_evict(struct m0_stob *stob)
struct m0_stob_domain * so_domain
M0_INTERNAL uint32_t m0_stob_block_shift(struct m0_stob *stob)
void(* sdo_stob_create_credit)(struct m0_stob_domain *dom, struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_stob_lookup(const struct m0_stob_id *id, struct m0_stob **out)
void(* sdo_stob_cfg_free)(void *cfg_create)
uint32_t(* sop_block_shift)(struct m0_stob *stob)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL struct m0_stob_cache * m0_stob_domain__cache(struct m0_stob_domain *dom)
M0_INTERNAL const struct m0_stob_id * m0_stob_id_get(struct m0_stob *stob)
enum m0_stob_state so_state
static struct m0_stob * stob
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
M0_INTERNAL void m0_stob_mod_fini(void)
struct m0_stob_cache sd_cache
M0_INTERNAL void m0_stob_destroy_credit(struct m0_stob *stob, struct m0_be_tx_credit *accum)
M0_INTERNAL void m0_stob_cache_lock(struct m0_stob_cache *cache)
M0_INTERNAL uint64_t m0_stob_dom_id_get(struct m0_stob *stob)
int(* sop_punch_credit)(struct m0_stob *stob, struct m0_indexvec *want, struct m0_indexvec *got, struct m0_be_tx_credit *accum)
static struct m0_stob_domain * dom
M0_INTERNAL void m0_stob_id_make(uint64_t container, uint64_t key, const struct m0_fid *dom_id, struct m0_stob_id *stob_id)
M0_INTERNAL int m0_stob_lookup_by_key(struct m0_stob_domain *dom, const struct m0_fid *stob_fid, struct m0_stob **out)
struct m0_chan so_ref_chan
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
int(* sdo_stob_create)(struct m0_stob *stob, struct m0_stob_domain *dom, struct m0_dtx *dtx, const struct m0_fid *stob_fid, void *cfg)
M0_INTERNAL void m0_stob_cache_unlock(struct m0_stob_cache *cache)
M0_INTERNAL void m0_chan_signal_lock(struct m0_chan *chan)
M0_INTERNAL struct m0_stob_domain * m0_stob_domain_find_by_stob_id(const struct m0_stob_id *stob_id)
M0_INTERNAL void m0_stob__state_set(struct m0_stob *stob, enum m0_stob_state state)
struct m0_stob *(* sdo_stob_alloc)(struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
M0_INTERNAL int m0_stob_create(struct m0_stob *stob, struct m0_dtx *dtx, const char *str_cfg)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
M0_INTERNAL int m0_stob_punch_credit(struct m0_stob *stob, struct m0_indexvec *want, struct m0_indexvec *got, struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_stob_destroy(struct m0_stob *stob, struct m0_dtx *dtx)
M0_INTERNAL enum m0_stob_state m0_stob_state_get(struct m0_stob *stob)
void(* sop_fini)(struct m0_stob *stob)
M0_INTERNAL struct m0_stob * m0_stob_domain__stob_alloc(struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
M0_INTERNAL int m0_stob_fd(struct m0_stob *stob)
M0_INTERNAL uint64_t m0_stob_id_dom_id_get(const struct m0_stob_id *stob_id)
int(* sdo_stob_cfg_parse)(const char *str_cfg_create, void **cfg_create)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL bool m0_stob_id_eq(const struct m0_stob_id *stob_id0, const struct m0_stob_id *stob_id1)
int(* sdo_stob_init)(struct m0_stob *stob, struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
M0_INTERNAL int m0_stob_find(const struct m0_stob_id *id, struct m0_stob **out)
const struct m0_stob_domain_ops * sd_ops
#define M0_ASSERT_INFO(cond, fmt,...)
int(* sop_fd)(struct m0_stob *stob)
M0_INTERNAL void m0_stob_delete_mark(struct m0_stob *stob)
M0_INTERNAL int m0_stob_punch(struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
M0_INTERNAL void m0_stob_create_credit(struct m0_stob_domain *dom, struct m0_be_tx_credit *accum)
M0_INTERNAL struct m0_stob * m0_stob_cache_lookup(struct m0_stob_cache *cache, const struct m0_fid *stob_fid)
M0_INTERNAL void m0_chan_fini_lock(struct m0_chan *chan)
M0_INTERNAL void m0_stob_get(struct m0_stob *stob)
M0_INTERNAL void m0_stob_put(struct m0_stob *stob)
M0_INTERNAL void m0_stob_cache_idle(struct m0_stob_cache *cache, struct m0_stob *stob)