Motr  M0
layout.c File Reference
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "lib/vec.h"
#include "lib/bob.h"
#include "lib/finject.h"
#include "lib/hash.h"
#include "lib/trace.h"
#include "motr/magic.h"
#include "motr/client_internal.h"
#include "layout/layout_internal.h"
#include "layout/layout.h"
#include "pool/pool.h"
Include dependency graph for layout.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LAYOUT
 

Enumerations

enum  { LNET_MAX_PAYLOAD = 1 << 20 }
 

Functions

 M0_BOB_DEFINE (static, &layout_bob, m0_layout)
 
 M0_BOB_DEFINE (static, &enum_bob, m0_layout_enum)
 
 M0_BOB_DEFINE (static, &layout_instance_bob, m0_layout_instance)
 
 M0_TL_DESCR_DEFINE (layout, "layout-list", static, struct m0_layout, l_list_linkage, l_magic, M0_LAYOUT_MAGIC, M0_LAYOUT_HEAD_MAGIC)
 
 M0_TL_DEFINE (layout, static, struct m0_layout)
 
M0_INTERNAL bool m0_layout__domain_invariant (const struct m0_layout_domain *dom)
 
static bool layout_invariant_internal (const struct m0_layout *l)
 
M0_INTERNAL bool m0_layout__allocated_invariant (const struct m0_layout *l)
 
M0_INTERNAL bool m0_layout__invariant (const struct m0_layout *l)
 
M0_INTERNAL bool m0_layout__enum_invariant (const struct m0_layout_enum *e)
 
M0_INTERNAL bool m0_layout__striped_allocated_invariant (const struct m0_striped_layout *stl)
 
M0_INTERNAL bool m0_layout__striped_invariant (const struct m0_striped_layout *stl)
 
M0_INTERNAL bool m0_layout__instance_invariant (const struct m0_layout_instance *li)
 
static void layout_type_get (struct m0_layout_domain *ldom, struct m0_layout_type *lt)
 
static void layout_type_put (struct m0_layout_domain *ldom, struct m0_layout_type *lt)
 
static void enum_type_get (struct m0_layout_domain *ldom, struct m0_layout_enum_type *let)
 
static void enum_type_put (struct m0_layout_domain *ldom, struct m0_layout_enum_type *let)
 
M0_INTERNAL void m0_layout_add (struct m0_layout_domain *dom, struct m0_layout *l)
 
M0_INTERNAL struct m0_layoutm0_layout__list_lookup (const struct m0_layout_domain *dom, uint64_t lid, bool ref_increment)
 
static struct m0_layoutlist_lookup (struct m0_layout_domain *dom, uint64_t lid)
 
M0_INTERNAL void m0_layout__init (struct m0_layout *l, struct m0_layout_domain *dom, uint64_t lid, struct m0_layout_type *lt, const struct m0_layout_ops *ops)
 
M0_INTERNAL void m0_layout__populate (struct m0_layout *l, uint32_t user_count)
 
M0_INTERNAL void m0_layout__fini_internal (struct m0_layout *l)
 
M0_INTERNAL void m0_layout__delete (struct m0_layout *l)
 
M0_INTERNAL void m0_layout__fini (struct m0_layout *l)
 
M0_INTERNAL void m0_layout__striped_init (struct m0_striped_layout *stl, struct m0_layout_domain *dom, uint64_t lid, struct m0_layout_type *type, const struct m0_layout_ops *ops)
 
M0_INTERNAL void m0_layout__striped_populate (struct m0_striped_layout *str_l, struct m0_layout_enum *e, uint32_t user_count)
 
M0_INTERNAL void m0_layout__striped_delete (struct m0_striped_layout *stl)
 
M0_INTERNAL void m0_layout__striped_fini (struct m0_striped_layout *str_l)
 
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)
 
M0_INTERNAL void m0_layout__enum_fini (struct m0_layout_enum *le)
 
M0_INTERNAL void m0_layout_enum_fini (struct m0_layout_enum *le)
 
M0_INTERNAL m0_bcount_t m0_layout__enum_max_recsize (struct m0_layout_domain *dom)
 
static void max_recsize_update (struct m0_layout_domain *dom)
 
M0_INTERNAL void m0_layout__log (const char *fn_name, const char *err_msg, uint64_t lid, int rc)
 
M0_INTERNAL int m0_layouts_init (void)
 
M0_INTERNAL void m0_layouts_fini (void)
 
M0_INTERNAL int m0_layout_domain_init (struct m0_layout_domain *dom)
 
M0_INTERNAL void m0_layout_domain_fini (struct m0_layout_domain *dom)
 
M0_INTERNAL void m0_layout_domain_cleanup (struct m0_layout_domain *dom)
 
M0_INTERNAL int m0_layout_standard_types_register (struct m0_layout_domain *dom)
 
M0_INTERNAL void m0_layout_standard_types_unregister (struct m0_layout_domain *dom)
 
M0_INTERNAL int m0_layout_type_register (struct m0_layout_domain *dom, struct m0_layout_type *lt)
 
M0_INTERNAL void m0_layout_type_unregister (struct m0_layout_domain *dom, struct m0_layout_type *lt)
 
M0_INTERNAL int m0_layout_enum_type_register (struct m0_layout_domain *dom, struct m0_layout_enum_type *let)
 
M0_INTERNAL void m0_layout_enum_type_unregister (struct m0_layout_domain *dom, struct m0_layout_enum_type *let)
 
M0_INTERNAL int64_t m0_layout_find_by_buffsize (struct m0_layout_domain *dom, struct m0_fid *pver, size_t buffsize)
 
M0_INTERNAL int64_t m0_layout_find_by_objsz (struct m0_client *cli, struct m0_fid *pool, size_t sz)
 
M0_INTERNAL struct m0_layoutm0_layout_find (struct m0_layout_domain *dom, uint64_t lid)
 
M0_INTERNAL void m0_layout_get (struct m0_layout *l)
 
M0_INTERNAL void m0_layout_put (struct m0_layout *l)
 
M0_INTERNAL void m0_layout_user_count_inc (struct m0_layout *l)
 
M0_INTERNAL void m0_layout_user_count_dec (struct m0_layout *l)
 
M0_INTERNAL int m0_layout_decode (struct m0_layout *l, struct m0_bufvec_cursor *cur, enum m0_layout_xcode_op op, struct m0_be_tx *tx)
 
M0_INTERNAL int m0_layout_encode (struct m0_layout *l, enum m0_layout_xcode_op op, struct m0_be_tx *tx, struct m0_bufvec_cursor *out)
 
M0_INTERNAL m0_bcount_t m0_layout_max_recsize (const struct m0_layout_domain *dom)
 
M0_INTERNAL struct m0_striped_layoutm0_layout_to_striped (const struct m0_layout *l)
 
M0_INTERNAL struct m0_layout_enumm0_striped_layout_to_enum (const struct m0_striped_layout *stl)
 
M0_INTERNAL struct m0_layout_enumm0_layout_to_enum (const struct m0_layout *l)
 
M0_INTERNAL uint32_t m0_layout_enum_nr (const struct m0_layout_enum *e)
 
M0_INTERNAL void m0_layout_enum_get (const struct m0_layout_enum *e, uint32_t idx, const struct m0_fid *gfid, struct m0_fid *out)
 
M0_INTERNAL void m0_layout__instance_init (struct m0_layout_instance *li, const struct m0_fid *gfid, struct m0_layout *l, const struct m0_layout_instance_ops *ops)
 
M0_INTERNAL void m0_layout__instance_fini (struct m0_layout_instance *li)
 
M0_INTERNAL int m0_layout_instance_build (struct m0_layout *l, const struct m0_fid *fid, struct m0_layout_instance **out)
 
M0_INTERNAL void m0_layout_instance_fini (struct m0_layout_instance *li)
 
M0_INTERNAL struct m0_layout_enumm0_layout_instance_to_enum (const struct m0_layout_instance *li)
 
M0_INTERNAL uint32_t m0_layout_enum_find (const struct m0_layout_enum *e, const struct m0_fid *gfid, const struct m0_fid *target)
 

Variables

struct m0_layout_type m0_pdclust_layout_type
 
struct m0_layout_enum_type m0_linear_enum_type
 
static const struct m0_bob_type layout_bob
 
static const struct m0_bob_type enum_bob
 
static const struct m0_bob_type layout_instance_bob