37 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LAYOUT 58 m0_layout_linear_enum_bob_check(le) &&
70 m0_layout_linear_enum_bob_check(le) &&
92 if (lin_enum ==
NULL) {
99 m0_layout_linear_enum_bob_init(lin_enum);
102 M0_LEAVE(
"linear enum pointer %p", lin_enum);
115 m0_layout_linear_enum_bob_fini(lin_enum);
127 if (
attr->lla_nr == 0 ||
attr->lla_B == 0) {
129 "lin_enum %p, attr %p, Invalid attributes, rc %d",
130 lin_enum,
attr, -EPROTO);
186 M0_ENTRY(
"lid %llu, enum_pointer %p", (
unsigned long long)lid, e);
188 m0_layout_linear_enum_bob_fini(lin_enum);
236 M0_ENTRY(
"lid %llu", (
unsigned long long)lid);
250 M0_LEAVE(
"lid %llu, rc %d", (
unsigned long long)lid,
rc);
273 M0_ENTRY(
"lid %llu", (
unsigned long long)lid);
277 M0_LEAVE(
"lid %llu", (
unsigned long long)lid);
288 M0_ENTRY(
"lid %llu, enum_pointer %p",
291 M0_LEAVE(
"lid %llu, enum_pointer %p, nr %lu",
307 M0_ENTRY(
"lid %llu, enum_pointer %p",
314 M0_LEAVE(
"lid %llu, enum_pointer %p, fid_pointer %p",
349 #undef M0_TRACE_SUBSYSTEM static int linear_populate(struct m0_layout_linear_enum *lin_enum, const struct m0_layout_linear_attr *attr)
static bool linear_invariant(const struct m0_layout_linear_enum *le)
int(* leto_register)(struct m0_layout_domain *dom, const struct m0_layout_enum_type *et)
static struct m0_layout_linear_enum * enum_to_linear_enum(const struct m0_layout_enum *e)
static struct buffer * cur(struct m0_addb2_mach *mach, m0_bcount_t space)
static m0_bcount_t linear_recsize(struct m0_layout_enum *e)
#define M0_LOG(level,...)
M0_INTERNAL int m0_linear_enum_build(struct m0_layout_domain *dom, const struct m0_layout_linear_attr *attr, struct m0_layout_linear_enum **out)
static int linear_register(struct m0_layout_domain *dom, const struct m0_layout_enum_type *et)
M0_INTERNAL void * m0_bufvec_cursor_addr(struct m0_bufvec_cursor *cur)
M0_INTERNAL bool m0_layout__striped_allocated_invariant(const struct m0_striped_layout *stl)
static const struct m0_bob_type linear_bob
static bool linear_allocated_invariant(const struct m0_layout_linear_enum *le)
static int linear_allocate(struct m0_layout_domain *dom, struct m0_layout_enum **out)
static void linear_get(const struct m0_layout_enum *e, uint32_t idx, const struct m0_fid *gfid, struct m0_fid *out)
M0_INTERNAL bool m0_layout__enum_invariant(const struct m0_layout_enum *e)
M0_INTERNAL bool m0_bufvec_cursor_move(struct m0_bufvec_cursor *cur, m0_bcount_t count)
struct m0_layout_linear_attr lle_attr
M0_INTERNAL void m0_layout__enum_fini(struct m0_layout_enum *le)
return M0_ERR(-EOPNOTSUPP)
struct m0_layout_enum lle_base
static const struct m0_layout_enum_type_ops linear_type_ops
static void attr(struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_step(const struct m0_bufvec_cursor *cur)
static void linear_fini(struct m0_layout_enum *e)
static int linear_encode(const struct m0_layout_enum *e, enum m0_layout_xcode_op op, struct m0_be_tx *tx, struct m0_bufvec_cursor *out)
M0_INTERNAL void m0_layout__enum_init(struct m0_layout_domain *dom, struct m0_layout_enum *le, struct m0_layout_enum_type *let, const struct m0_layout_enum_ops *ops)
#define bob_of(ptr, type, field, bt)
static struct m0_stob_domain * dom
static int linear_decode(struct m0_layout_enum *e, struct m0_bufvec_cursor *cur, enum m0_layout_xcode_op op, struct m0_be_tx *tx, struct m0_striped_layout *stl)
M0_INTERNAL bool m0_layout__domain_invariant(const struct m0_layout_domain *dom)
M0_INTERNAL void m0_layout__log(const char *fn_name, const char *err_msg, uint64_t lid, int rc)
static uint32_t linear_nr(const struct m0_layout_enum *e)
static void linear_delete(struct m0_layout_enum *e)
#define M0_FI_ENABLED(tag)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_copyto(struct m0_bufvec_cursor *dcur, void *sdata, m0_bcount_t num_bytes)
static const struct m0_layout_enum_ops linear_enum_ops
struct m0_striped_layout * le_sl
uint32_t(* leo_nr)(const struct m0_layout_enum *e)
M0_INTERNAL void m0_fid_convert_gob2cob(const struct m0_fid *gob_fid, struct m0_fid *cob_fid, uint32_t device_id)
M0_BOB_DEFINE(static, &linear_bob, m0_layout_linear_enum)
static m0_bcount_t linear_max_recsize(void)
M0_INTERNAL bool m0_fid_is_valid(const struct m0_fid *fid)
static void linear_unregister(struct m0_layout_domain *dom, const struct m0_layout_enum_type *et)
#define offsetof(typ, memb)
struct m0_layout_enum_type m0_linear_enum_type