Motr
M0
|
#include "xcode/xcode_attr.h"
#include "fid/fid.h"
#include "fid/fid_xc.h"
#include "lib/types.h"
#include "lib/buf.h"
#include "lib/buf_xc.h"
#include "lib/cookie.h"
#include "lib/cookie_xc.h"
#include "rpc/at.h"
#include "rpc/at_xc.h"
#include "fop/fom_generic.h"
#include "fop/fom_generic_xc.h"
#include "fop/fom_interpose.h"
#include "dix/layout.h"
#include "dix/layout_xc.h"
#include "dtm0/tx_desc.h"
#include "dtm0/tx_desc_xc.h"
Go to the source code of this file.
Data Structures | |
struct | m0_cas_hint |
struct | m0_cas_id |
struct | m0_cas_kv |
struct | m0_cas_kv_vec |
struct | m0_crv |
struct | m0_cas_rec |
struct | m0_cas_recv |
struct | m0_cas_op |
struct | m0_cas_rep |
Macros | |
#define | __MOTR_CAS_CAS_H__ |
#define | CRV_F "%" PRIu64 ":%c" |
#define | CRV_P(__crv) m0_crv_ts(__crv).dts_phys, m0_crv_tbs(__crv) ? 'd' : 'a' |
#define | M0_CRV_INIT_NONE ((struct m0_crv) { .crv_encoded = M0_CRV_VER_NONE }) |
Enumerations | |
enum | m0_cas_op_flags { COF_SLANT = 1 << 0, COF_CREATE = 1 << 1, COF_OVERWRITE = 1 << 2, COF_CROW = 1 << 3, COF_RESERVE = 1 << 4, COF_DEL_LOCK = 1 << 5, COF_EXCLUDE_START_KEY = 1 << 6, COF_SYNC_WAIT = 1 << 7, COF_SKIP_LAYOUT = 1 << 8, COF_VERSIONED = 1 << 9, COF_SHOW_DEAD = 1 << 10 } |
enum | m0_cas_opcode { CO_GET, CO_PUT, CO_DEL, CO_CUR, CO_REP, CO_GC, CO_MIN, CO_TRUNC, CO_DROP, CO_MEM_PLACE, CO_MEM_FREE, CO_NR } |
enum | m0_cas_type { CT_META, CT_BTREE, CT_DEAD_INDEX, CT_MEM } |
enum | { M0_CRV_TBS = 1L << (sizeof(uint64_t) * CHAR_BIT - 1), M0_CRV_VER_NONE = 0, M0_CRV_VER_MAX = (UINT64_MAX & ~M0_CRV_TBS) - 1, M0_CRV_VER_MIN = M0_CRV_VER_NONE + 1 } |
Functions | |
struct m0_cas_hint | M0_XCA_DOMAIN (rpc) |
struct m0_crv | M0_XCA_DOMAIN (rpc|be) |
M0_INTERNAL void | m0_cas_svc_init (void) |
M0_INTERNAL void | m0_cas_svc_fini (void) |
M0_INTERNAL void | m0_cas_svc_fop_args (struct m0_sm_conf **sm_conf, const struct m0_fom_type_ops **fom_ops, struct m0_reqh_service_type **svctype) |
M0_INTERNAL void | m0_cas__ut_svc_be_set (struct m0_reqh_service *svc, struct m0_be_domain *dom) |
M0_INTERNAL struct m0_be_domain * | m0_cas__ut_svc_be_get (struct m0_reqh_service *svc) |
M0_INTERNAL int | m0_cas_fom_spawn (struct m0_fom *lead, struct m0_fom_thralldom *thrall, struct m0_fop *cas_fop, void(*on_fom_complete)(struct m0_fom_thralldom *, struct m0_fom *)) |
M0_INTERNAL void | m0_cas_id_fini (struct m0_cas_id *cid) |
M0_INTERNAL bool | m0_cas_id_invariant (const struct m0_cas_id *cid) |
M0_INTERNAL bool | cas_in_ut (void) |
M0_INTERNAL void | m0_crv_init (struct m0_crv *crv, const struct m0_dtm0_ts *ts, bool tbs) |
M0_INTERNAL bool | m0_crv_is_none (const struct m0_crv *crv) |
M0_INTERNAL int | m0_crv_cmp (const struct m0_crv *left, const struct m0_crv *right) |
M0_INTERNAL bool | m0_crv_tbs (const struct m0_crv *crv) |
M0_INTERNAL void | m0_crv_tbs_set (struct m0_crv *crv, bool tbs) |
M0_INTERNAL struct m0_dtm0_ts | m0_crv_ts (const struct m0_crv *crv) |
M0_INTERNAL void | m0_crv_ts_set (struct m0_crv *crv, const struct m0_dtm0_ts *ts) |
uint32_t cg_flags |
struct m0_cas_recv cg_rec |
struct m0_dtm0_tx_desc cg_txd |
struct m0_fop_mod_rep cgr_mod_rep |
int32_t cgr_rc |
Status code of operation. If code != 0, then no input record from request is processed successfully and contents of m0_cas_rep::cgr_rep field is undefined.
Zero status code means that at least one input record is processed successfully. Operation status code of individual input record can be obtained through m0_cas_rep::cgr_rep::cg_rec::cr_rc.
struct m0_cas_recv cgr_rep |
struct m0_fid ci_fid |
struct m0_cas_hint ci_hint |
struct m0_dix_layout ci_layout |
struct m0_rpc_at_buf ck_key |
struct m0_rpc_at_buf ck_val |
struct m0_cas_hint cr_hint |
struct m0_rpc_at_buf cr_key |
struct m0_cas_kv_vec cr_kv_bufs |
Vector of AT buffers to request key/value buffers in CUR request.
CUR request only specifies the starting key in cr_key. If several keys/values from reply should be transferred via bulk, then request should have descriptors for them => vector is required.
For now, vector size is either 0 (inline transmission is requested for all records) or equals to cr_rc (individual AT transmission method for every key/value).
uint64_t cr_rc |
In GET, DEL, PUT replies, return code for the operation on this record. In CUR request, the number of consecutive records to return.
In CUR reply, the consecutive number of the record for the current key. For example, if there are two records in CUR request requesting 2 and 3 next records respectively, then cr_rc values in reply records will be: 1,2,1,2,3.
Also, CAS service stops iteration for the current CAS-CUR key on error and proceed with the next key in the input vector. Suppose there is a CUR request, requesting 10 records starting from K0 and 10 records starting with K1. Suppose iteration failed on the fifth record after K0 and all K1 records were processed successfully. In this case, the reply would contain at least 15 records. First 5 will be for K0, the last of which would contain errno, the next 10 records will be for K1. Current implementation will add final 5 zeroed records.
struct m0_cas_rec* cr_rec |
struct m0_rpc_at_buf cr_val |
struct m0_crv cr_ver |