Motr  M0
layout.c File Reference
#include "lib/errno.h"
#include "fid/fid.h"
#include "lib/locality.h"
#include "motr/client.h"
#include "motr/client_internal.h"
#include "motr/layout.h"
#include "dix/layout.h"
#include "cob/cob.h"
#include "lib/trace.h"
#include "lib/finject.h"
Include dependency graph for layout.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 

Functions

 M0_BOB_DEFINE (M0_INTERNAL, &ol_bobtype, m0_op_layout)
 
static int pdclust_layout_get (struct m0_client_layout *layout)
 
static void pdclust_layout_put (struct m0_client_layout *layout)
 
static int pdclust_layout_alloc (struct m0_client_layout **out)
 
static int pdclust_layout_copy_to_app (struct m0_client_layout *to, void *from)
 
static int pdclust_layout_copy_from_app (struct m0_client_layout *from, void *to)
 
static int pdclust_layout_launch (struct m0_op_layout *ol)
 
int m0_client_layout_capture (struct m0_client_layout *layout, struct m0_obj *obj, struct m0_client_layout **out)
 
static int capture_layout_copy_to_app (struct m0_client_layout *to, void *from)
 
static int capture_layout_copy_from_app (struct m0_client_layout *from, void *to)
 
static int capture_layout_get_sync (struct m0_obj *obj)
 
static int capture_layout_get (struct m0_client_layout *layout)
 
static void capture_layout_put (struct m0_client_layout *layout)
 
static int capture_layout_io_build (struct m0_io_args *args, struct m0_op **op)
 
static int capture_layout_alloc (struct m0_client_layout **out)
 
M0_INTERNAL int m0_client__layout_get (struct m0_client_layout *layout)
 
M0_INTERNAL void m0_client__layout_put (struct m0_client_layout *layout)
 
static bool layout_op_invariant (struct m0_op_layout *ol)
 
static void layout_op_cb_fini (struct m0_op_common *oc)
 
static void layout_op_cb_free (struct m0_op_common *oc)
 
static void layout_op_cb_launch (struct m0_op_common *oc)
 
static int layout_op_init (struct m0_obj *obj, struct m0_client_layout *layout, enum m0_entity_opcode opcode, struct m0_op *op)
 
int m0_client_layout_op (struct m0_obj *obj, enum m0_entity_opcode opcode, struct m0_client_layout *layout, struct m0_op **op)
 
struct m0_client_layoutm0_client_layout_alloc (enum m0_client_layout_type type)
 
void m0_client_layout_free (struct m0_client_layout *layout)
 

Variables

const struct m0_bob_type ol_bobtype
 
static const struct m0_client_layout_ops layout_pdclust_ops
 
static const struct m0_client_layout_ops layout_capture_ops
 
static const struct m0_op_layout_ops m0_op_layout_pdclust_ops
 
static const struct m0_op_layout_ops m0_op_layout_capture_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 33 of file layout.c.

Function Documentation

◆ capture_layout_alloc()

static int capture_layout_alloc ( struct m0_client_layout **  out)
static

Definition at line 249 of file layout.c.

Here is the call graph for this function:

◆ capture_layout_copy_from_app()

static int capture_layout_copy_from_app ( struct m0_client_layout from,
void *  to 
)
static

Definition at line 181 of file layout.c.

Here is the call graph for this function:

◆ capture_layout_copy_to_app()

static int capture_layout_copy_to_app ( struct m0_client_layout to,
void *  from 
)
static

Definition at line 162 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ capture_layout_get()

static int capture_layout_get ( struct m0_client_layout layout)
static

Definition at line 217 of file layout.c.

Here is the call graph for this function:

◆ capture_layout_get_sync()

static int capture_layout_get_sync ( struct m0_obj obj)
static

Definition at line 208 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ capture_layout_io_build()

static int capture_layout_io_build ( struct m0_io_args args,
struct m0_op **  op 
)
static

Definition at line 236 of file layout.c.

Here is the call graph for this function:

◆ capture_layout_put()

static void capture_layout_put ( struct m0_client_layout layout)
static

Definition at line 228 of file layout.c.

◆ layout_op_cb_fini()

static void layout_op_cb_fini ( struct m0_op_common oc)
static

Definition at line 315 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layout_op_cb_free()

static void layout_op_cb_free ( struct m0_op_common oc)
static

Definition at line 337 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layout_op_cb_launch()

static void layout_op_cb_launch ( struct m0_op_common oc)
static

Definition at line 356 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layout_op_init()

static int layout_op_init ( struct m0_obj obj,
struct m0_client_layout layout,
enum m0_entity_opcode  opcode,
struct m0_op op 
)
static

Definition at line 381 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layout_op_invariant()

static bool layout_op_invariant ( struct m0_op_layout ol)
static

Checks a layout operation is not malformed or corrupted.

Definition at line 302 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ M0_BOB_DEFINE()

M0_BOB_DEFINE ( M0_INTERNAL  ,
ol_bobtype,
m0_op_layout   
)

◆ m0_client__layout_get()

M0_INTERNAL int m0_client__layout_get ( struct m0_client_layout layout)

-------------------------------------------------------------------------—*

Client LAYOUT APIS *

Definition at line 276 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_client__layout_put()

M0_INTERNAL void m0_client__layout_put ( struct m0_client_layout layout)

Definition at line 288 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pdclust_layout_alloc()

static int pdclust_layout_alloc ( struct m0_client_layout **  out)
static

Definition at line 62 of file layout.c.

Here is the call graph for this function:

◆ pdclust_layout_copy_from_app()

static int pdclust_layout_copy_from_app ( struct m0_client_layout from,
void *  to 
)
static

Definition at line 104 of file layout.c.

Here is the call graph for this function:

◆ pdclust_layout_copy_to_app()

static int pdclust_layout_copy_to_app ( struct m0_client_layout to,
void *  from 
)
static

Definition at line 86 of file layout.c.

Here is the call graph for this function:

◆ pdclust_layout_get()

static int pdclust_layout_get ( struct m0_client_layout layout)
static

-------------------------------------------------------------------------—*

Routines for pdclust layout *

Definition at line 52 of file layout.c.

◆ pdclust_layout_launch()

static int pdclust_layout_launch ( struct m0_op_layout ol)
static

Definition at line 120 of file layout.c.

Here is the call graph for this function:

◆ pdclust_layout_put()

static void pdclust_layout_put ( struct m0_client_layout layout)
static

Definition at line 57 of file layout.c.

Variable Documentation

◆ layout_capture_ops

static const struct m0_client_layout_ops layout_capture_ops
static
Initial value:
= {
.lo_alloc = capture_layout_alloc,
.lo_get = capture_layout_get,
.lo_put = capture_layout_put,
.lo_io_build = capture_layout_io_build,
}
static void capture_layout_put(struct m0_client_layout *layout)
Definition: layout.c:228
static int capture_layout_alloc(struct m0_client_layout **out)
Definition: layout.c:249
static int capture_layout_get(struct m0_client_layout *layout)
Definition: layout.c:217
static int capture_layout_io_build(struct m0_io_args *args, struct m0_op **op)
Definition: layout.c:236

Definition at line 47 of file layout.c.

◆ layout_pdclust_ops

static const struct m0_client_layout_ops layout_pdclust_ops
static
Initial value:
= {
.lo_alloc = pdclust_layout_alloc,
.lo_get = pdclust_layout_get,
.lo_put = pdclust_layout_put,
.lo_io_build = m0__obj_io_build
}
static int pdclust_layout_get(struct m0_client_layout *layout)
Definition: layout.c:52
static int pdclust_layout_alloc(struct m0_client_layout **out)
Definition: layout.c:62
static void pdclust_layout_put(struct m0_client_layout *layout)
Definition: layout.c:57
M0_INTERNAL int m0__obj_io_build(struct m0_io_args *args, struct m0_op **op)
Definition: io.c:677

Definition at line 46 of file layout.c.

◆ m0_op_layout_capture_ops

const struct m0_op_layout_ops m0_op_layout_capture_ops
static
Initial value:
= {
.olo_launch = m0_layout_op_launch,
.olo_copy_to_app = capture_layout_copy_to_app,
.olo_copy_from_app = capture_layout_copy_from_app,
}
M0_INTERNAL int m0_layout_op_launch(struct m0_op_layout *ol)
static int capture_layout_copy_from_app(struct m0_client_layout *from, void *to)
Definition: layout.c:181
static int capture_layout_copy_to_app(struct m0_client_layout *to, void *from)
Definition: layout.c:162

Definition at line 202 of file layout.c.

◆ m0_op_layout_pdclust_ops

const struct m0_op_layout_ops m0_op_layout_pdclust_ops
static
Initial value:
= {
.olo_launch = pdclust_layout_launch,
.olo_copy_to_app = pdclust_layout_copy_to_app,
.olo_copy_from_app = pdclust_layout_copy_from_app,
}
static int pdclust_layout_copy_from_app(struct m0_client_layout *from, void *to)
Definition: layout.c:104
static int pdclust_layout_launch(struct m0_op_layout *ol)
Definition: layout.c:120
static int pdclust_layout_copy_to_app(struct m0_client_layout *to, void *from)
Definition: layout.c:86

Definition at line 128 of file layout.c.

◆ ol_bobtype

const struct m0_bob_type ol_bobtype
Initial value:
= {
.bt_name = "ol_bobtype",
.bt_magix_offset = offsetof(struct m0_op_layout, ol_magic),
.bt_magix = M0_OL_MAGIC,
.bt_check = NULL,
}
#define NULL
Definition: misc.h:38
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 37 of file layout.c.