Motr
M0
|
#include "motr/client.h"
#include "motr/client_internal.h"
#include "motr/addb.h"
#include "motr/idx.h"
#include "motr/sync.h"
#include "dtm0/dtx.h"
#include "dtm0/service.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "lib/trace.h"
Go to the source code of this file.
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT |
Functions | |
static void | idx_op_cb_launch (struct m0_op_common *oc) |
static void | idx_op_cb_fini (struct m0_op_common *oc) |
static void | idx_op_cb_free (struct m0_op_common *oc) |
static void | idx_op_cb_cancel (struct m0_op_common *oc) |
M0_BOB_DEFINE (M0_INTERNAL, &oi_bobtype, m0_op_idx) | |
static struct m0_client * | oi_instance (struct m0_op_idx *oi) |
M0_INTERNAL bool | m0__idx_op_invariant (struct m0_op_idx *oi) |
M0_INTERNAL struct m0_idx * | m0__idx_entity (struct m0_entity *entity) |
M0_INTERNAL int | m0__idx_pool_version_get (struct m0_idx *idx, struct m0_pool_version **pv) |
static int | idx_pool_version_get (struct m0_op_idx *oi) |
static int | idx_op_init (struct m0_idx *idx, int opcode, struct m0_bufvec *keys, struct m0_bufvec *vals, int32_t *rcs, uint32_t flags, struct m0_op *op) |
static struct m0_op_idx * | ar_ast2oi (struct m0_sm_ast *ast) |
static void | idx_op_complete_state_set (struct m0_sm_group *grp, struct m0_sm_ast *ast, uint64_t mask) |
M0_INTERNAL void | idx_op_ast_stable (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
M0_INTERNAL void | idx_op_ast_executed (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
M0_INTERNAL void | idx_op_ast_complete (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
static void | idx_op_fail (struct m0_op_idx *oi, int rc) |
M0_INTERNAL void | idx_op_ast_fail (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
int | m0_idx_op (struct m0_idx *idx, enum m0_idx_opcode opcode, struct m0_bufvec *keys, struct m0_bufvec *vals, int32_t *rcs, uint32_t flags, struct m0_op **op) |
M0_INTERNAL int | m0_idx_op_namei (struct m0_entity *entity, struct m0_op **op, enum m0_entity_opcode opcode) |
void | m0_idx_init (struct m0_idx *idx, struct m0_realm *parent, const struct m0_uint128 *id) |
void | m0_idx_fini (struct m0_idx *idx) |
M0_INTERNAL void | m0_idx_service_config (struct m0_client *m0c, int svc_id, void *svc_conf) |
M0_INTERNAL void | m0_idx_service_register (int svc_id, struct m0_idx_service_ops *sops, struct m0_idx_query_ops *qops) |
M0_INTERNAL void | m0_idx_services_register (void) |
Variables | |
static struct m0_idx_service | idx_services [M0_IDX_MAX_SERVICE_ID] |
const struct m0_bob_type | oi_bobtype |
M0_INTERNAL void idx_op_ast_complete | ( | struct m0_sm_group * | grp, |
struct m0_sm_ast * | ast | ||
) |
M0_INTERNAL void idx_op_ast_executed | ( | struct m0_sm_group * | grp, |
struct m0_sm_ast * | ast | ||
) |
M0_INTERNAL void idx_op_ast_fail | ( | struct m0_sm_group * | grp, |
struct m0_sm_ast * | ast | ||
) |
M0_INTERNAL void idx_op_ast_stable | ( | struct m0_sm_group * | grp, |
struct m0_sm_ast * | ast | ||
) |
|
static |
Cancels all the fops that are sent during launch operation
oc | operation being launched. Note the operation is of type m0_op_common although it has to be allocated as a m0_op_idx. |
Definition at line 437 of file idx.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Fails a whole index operation and moves the state of its state machines to failed or error states.
oi | index operation to be failed. |
rc | error code that explains why the operation is being failed. |
Definition at line 325 of file idx.c.
|
static |
Sets an index operation. Allocates the operation if it has not been pre- allocated.
entity | Entity of the obj the operation is targeted to. |
op | Operation to be prepared. |
opcode | Specific operation code. |
Definition at line 165 of file idx.c.
|
static |
M0_INTERNAL bool m0__idx_op_invariant | ( | struct m0_op_idx * | oi | ) |
M0_INTERNAL int m0__idx_pool_version_get | ( | struct m0_idx * | idx, |
struct m0_pool_version ** | pv | ||
) |
M0_BOB_DEFINE | ( | M0_INTERNAL | , |
& | oi_bobtype, | ||
m0_op_idx | |||
) |
M0_INTERNAL int m0_idx_op_namei | ( | struct m0_entity * | entity, |
struct m0_op ** | op, | ||
enum m0_entity_opcode | opcode | ||
) |
Sets an entity operation to create or delete an index.
entity | entity to be modified. |
op | pointer to the operation being set. |
opcode | M0_EO_CREATE or M0_EO_DELETE. |
Definition at line 603 of file idx.c.
M0_INTERNAL void m0_idx_service_config | ( | struct m0_client * | m0c, |
int | svc_id, | ||
void * | svc_conf | ||
) |
M0_INTERNAL void m0_idx_service_register | ( | int | svc_id, |
struct m0_idx_service_ops * | sops, | ||
struct m0_idx_query_ops * | qops | ||
) |
M0_INTERNAL void m0_idx_services_register | ( | void | ) |
Returns the client instance associated to an index operation.
oi | index operation pointing to the instance. |
Definition at line 60 of file idx.c.
|
static |
const struct m0_bob_type oi_bobtype |