38 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_STOB 77 static,
struct stob_null, sn_link, sn_magic,
102 type->st_private = snl;
138 rc = snd1 !=
NULL ? -EEXIST : 0;
140 stob_null_domains_tlink_init_at(snd, &snl->
snl_domains);
149 stob_null_domains_tlink_del_fini(snd);
180 const char *location_data,
190 rc = snl ==
NULL ? -ENOMEM : 0;
192 rc =
rc ?: snd ==
NULL ? -ENOENT : 0;
211 const char *location_data,
219 rc = snl ==
NULL ? -ENOMEM : 0;
221 rc =
rc ?: snd !=
NULL ? -EEXIST : 0;
224 rc =
rc ?: snd ==
NULL ? -ENOMEM : 0;
233 stob_null_stobs_tlist_init(&snd->
snd_stobs);
237 stob_null_stobs_tlist_fini(&snd->
snd_stobs);
248 const char *location_data)
256 stob_null_stobs_tlist_fini(&snd->
snd_stobs);
265 const struct m0_fid *stob_fid)
287 const struct m0_fid *stob_fid,
308 rc = sn1 !=
NULL ? -EEXIST : 0;
310 stob_null_stobs_tlink_init_at(sn, &snd->
snd_stobs);
318 stob_null_stobs_tlink_del_fini(sn);
324 const struct m0_fid *stob_fid)
335 return sn ==
NULL ? -ENOENT : 0;
350 const struct m0_fid *stob_fid,
358 rc = sn ==
NULL ? -ENOMEM : 0;
433 .ft_name =
"nullstob",
437 #undef M0_TRACE_SUBSYSTEM
static struct m0_stob_type_ops stob_null_type_ops
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
void(* sto_register)(struct m0_stob_type *type)
static void stob_null_free(struct m0_stob_domain *dom, struct m0_stob *stob)
M0_INTERNAL void m0_stob_domain__dom_id_make(struct m0_fid *dom_id, uint8_t type_id, uint64_t dom_container, uint64_t dom_key)
const struct m0_stob_ops * so_ops
static int stob_null_create(struct m0_stob *stob, struct m0_stob_domain *dom, struct m0_dtx *dtx, const struct m0_fid *stob_fid, void *cfg)
static uint32_t stob_null_block_shift(struct m0_stob *stob)
static int stob_null_domain_add(struct stob_null_domain *snd, struct stob_null_lists *snl)
static void stob_null_create_credit(struct m0_stob_domain *dom, struct m0_be_tx_credit *accum)
M0_INTERNAL uint8_t m0_stob_type_id_get(const struct m0_stob_type *type)
#define container_of(ptr, type, member)
void(* sdo_fini)(struct m0_stob_domain *dom)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL int m0_fid_cmp(const struct m0_fid *fid0, const struct m0_fid *fid1)
static struct m0_stob * stob_null_alloc(struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
static void stob_null_domain_del(struct stob_null_domain *snd, struct stob_null_lists *snl)
static void stob_null_del(struct stob_null *sn, struct stob_null_domain *snd)
static int stob_null_destroy(struct m0_stob *stob, struct m0_dtx *dtx)
static int stob_null_domain_destroy(struct m0_stob_type *type, const char *location_data)
struct stob_null_lists * snd_lists
static void stob_null_destroy_credit(struct m0_stob *stob, struct m0_be_tx_credit *accum)
static struct m0_stob * stob
static int stob_null_domain_init(struct m0_stob_type *type, const char *location_data, void *cfg_init, struct m0_stob_domain **out)
static void stob_null_fini(struct m0_stob *stob)
static struct m0_stob_domain * dom
static int stob_null_punch(struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
M0_TL_DEFINE(stob_null_stobs, static, struct stob_null)
const struct m0_stob_type m0_stob_null_type
void * m0_alloc(size_t size)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
static int stob_null_domain_cfg_create_parse(const char *str_cfg_create, void **cfg_create)
static struct m0_stob_domain_ops stob_null_domain_ops
static void stob_null_type_register(struct m0_stob_type *type)
static struct stob_null_domain * stob_null_domain_find(struct stob_null_lists *snl, const char *path, bool take_lock)
static struct stob_null * stob_null_find(struct stob_null_domain *snd, const struct m0_fid *stob_fid, bool take_lock)
struct m0_stob_domain snd_dom
void(* sop_fini)(struct m0_stob *stob)
static void stob_null_cfg_free(void *cfg_create)
static int stob_null_add(struct stob_null *sn, struct stob_null_domain *snd)
M0_INTERNAL void m0_stob_domain__id_set(struct m0_stob_domain *dom, struct m0_fid *dom_id)
#define M0_ALLOC_PTR(ptr)
static void stob_null_domain_fini(struct m0_stob_domain *dom)
struct m0_fid sn_stob_fid
static int stob_null_init(struct m0_stob *stob, struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
M0_TL_DESCR_DEFINE(stob_null_stobs, "list of null stobs in the domain", static, struct stob_null, sn_link, sn_magic, M0_STOB_NULL_MAGIC, M0_STOB_NULL_HEAD_MAGIC)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
struct stob_null_domain * sn_dom
const struct m0_stob_domain_ops * sd_ops
static void stob_null_type_deregister(struct m0_stob_type *type)
static void stob_null_domain_cfg_init_free(void *cfg_init)
static int stob_null_domain_cfg_init_parse(const char *str_cfg_init, void **cfg_init)
const struct m0_stob_type_ops * st_ops
static int stob_null_domain_create(struct m0_stob_type *type, const char *location_data, uint64_t dom_key, void *cfg_create)
static struct stob_null_domain * stob_null_domain_container(struct m0_stob_domain *dom)
#define m0_tl_find(name, var, head,...)
static int stob_null_cfg_parse(const char *str_cfg_create, void **cfg_create)
static struct m0_stob_ops stob_null_ops
static void stob_null_domain_cfg_create_free(void *cfg_create)