|
Motr
M0
|
#include "motr/client.h"#include "motr/client_internal.h"#include "motr/addb.h"#include "motr/idx.h"#include "lib/errno.h"#include "lib/trace.h"#include <stdio.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>
Go to the source code of this file.
Data Structures | |
| struct | key |
| struct | val |
| struct | kv_pair |
| struct | index |
Macros | |
| #define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT |
| #define | MAX_IDX_FNAME_LEN (256) |
| #define | IDX_CSV_DELIMITER (',') |
Functions | |
| static uint64_t | kv_hash (const struct m0_htable *htable, const struct key *key) |
| static int | kv_hash_key_eq (const struct key *k1, const struct key *k2) |
| M0_HT_DESCR_DEFINE (kv_pairs, "Hash of key value pairs", static, struct kv_pair, p_link, p_magic, 0x41, 0x67, p_key, kv_hash, kv_hash_key_eq) | |
| M0_HT_DEFINE (kv_pairs, static, struct kv_pair, struct key) | |
| static uint64_t | idx_hash (const struct m0_htable *htable, const struct m0_uint128 *key) |
| static int | idx_hash_key_eq (const struct m0_uint128 *key1, const struct m0_uint128 *key2) |
| M0_HT_DESCR_DEFINE (indices, "Hash of key value pairs", static, struct index, i_link, i_magic, 0x43, 0x67, i_fid, idx_hash, idx_hash_key_eq) | |
| M0_HT_DEFINE (indices, static, struct index, struct m0_uint128) | |
| static int | make_idx_fname (char *fname, struct m0_uint128 idx_fid) |
| static int | idx_access (struct m0_uint128 idx_fid) |
| static int | idx_rm (struct m0_uint128 idx_fid) |
| static struct index * | idx_load (struct m0_uint128 idx_fid) |
| static int | idx_dump (struct index *midx) |
| static int | idx_find (struct m0_uint128 idx_fid, struct index **midx, bool to_load) |
| static int | idx_mock_namei_new (struct m0_op_idx *oi) |
| static int | idx_mock_namei_del (struct m0_op_idx *oi) |
| static int | idx_mock_namei_lookup (struct m0_op_idx *oi) |
| static int | idx_mock_namei_list (struct m0_op_idx *oi) |
| static int | idx_mock_get (struct m0_op_idx *oi) |
| static int | idx_mock_put (struct m0_op_idx *oi) |
| static int | idx_mock_del (struct m0_op_idx *oi) |
| static int | idx_mock_next (struct m0_op_idx *oi) |
| static int | idx_mock_init (void *svc) |
| static int | idx_mock_fini (void *svc) |
| M0_INTERNAL void | m0_idx_mock_register (void) |
Variables | |
| static char * | idx_store_path = NULL |
| static struct m0_htable | idx_htable |
| static struct m0_idx_query_ops | idx_mock_query_ops |
| static struct m0_idx_service_ops | idx_mock_svc_ops |
| #define IDX_CSV_DELIMITER (',') |
Definition at line 142 of file idx_mock.c.
| #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT |
Definition at line 30 of file idx_mock.c.
| #define MAX_IDX_FNAME_LEN (256) |
----------------------------------------------------------------------—*
Definition at line 141 of file idx_mock.c.
|
static |
Definition at line 151 of file idx_mock.c.


|
static |
Definition at line 243 of file idx_mock.c.


|
static |
Lookup an index in hash table and disks.
| idx_fid | index's FID. |
| midx | where a found or loaded index is store. |
| to_load | index is loaded into memory if it is set. |
Definition at line 332 of file idx_mock.c.


|
static |
Generates a hash key for an entity.
Definition at line 112 of file idx_mock.c.
|
static |
Compares the hash keys of two entities.
Definition at line 122 of file idx_mock.c.
|
static |
Definition at line 183 of file idx_mock.c.


|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
----------------------------------------------------------------------—*
Definition at line 363 of file idx_mock.c.

|
static |
|
static |
|
static |
Definition at line 167 of file idx_mock.c.


Definition at line 65 of file idx_mock.c.
| M0_HT_DEFINE | ( | indices | , |
| static | , | ||
| struct index | , | ||
| struct m0_uint128 | |||
| ) |
| M0_HT_DESCR_DEFINE | ( | kv_pairs | , |
| "Hash of key value pairs" | , | ||
| static | , | ||
| struct kv_pair | , | ||
| p_link | , | ||
| p_magic | , | ||
| 0x41 | , | ||
| 0x67 | , | ||
| p_key | , | ||
| kv_hash | , | ||
| kv_hash_key_eq | |||
| ) |
| M0_HT_DESCR_DEFINE | ( | indices | , |
| "Hash of key value pairs" | , | ||
| static | , | ||
| struct index | , | ||
| i_link | , | ||
| i_magic | , | ||
| 0x43 | , | ||
| 0x67 | , | ||
| i_fid | , | ||
| idx_hash | , | ||
| idx_hash_key_eq | |||
| ) |
| M0_INTERNAL void m0_idx_mock_register | ( | void | ) |
Definition at line 768 of file idx_mock.c.


|
static |
|
static |
Definition at line 135 of file idx_mock.c.
|
static |
Definition at line 634 of file idx_mock.c.
|
static |
Definition at line 703 of file idx_mock.c.
|
static |
Definition at line 42 of file idx_mock.c.