diff options
author | dormando <dormando@rydia.net> | 2020-08-29 23:15:23 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-10-30 15:50:12 -0700 |
commit | 416a7a10014299fd08bf4b35e4ffa0870cd330b0 (patch) | |
tree | 6c767d9538b00bae8a393e609a73790e015d6610 /storage.h | |
parent | df49d38930a32d342e1a3ab980c1ec432d138c2c (diff) | |
download | memcached-416a7a10014299fd08bf4b35e4ffa0870cd330b0.tar.gz |
core: move more storage functions to storage.c
extstore.h is now only used from storage.c. starting a path towards
getting the storage interface to be more generalized.
should be no functional changes.
Diffstat (limited to 'storage.h')
-rw-r--r-- | storage.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1,8 +1,24 @@ #ifndef STORAGE_H #define STORAGE_H +void storage_delete(void *e, item *it); +#ifdef EXTSTORE +#define STORAGE_delete(e, it) \ + do { \ + storage_delete(e, it); \ + } while (0) +#else +#define STORAGE_delete(...) +#endif + +void storage_stats(ADD_STAT add_stats, conn *c); +void process_extstore_stats(ADD_STAT add_stats, conn *c); +bool storage_validate_item(void *e, item *it); +int storage_get_item(conn *c, item *it, mc_resp *resp); +#ifdef EXTSTORE void storage_submit_cb(void *ctx, io_pending_t *pending); void storage_free_cb(void *ctx, io_pending_t *pending); +#endif int start_storage_write_thread(void *arg); void storage_write_pause(void); void storage_write_resume(void); @@ -10,6 +26,10 @@ int start_storage_compact_thread(void *arg); void storage_compact_pause(void); void storage_compact_resume(void); struct extstore_conf_file *storage_conf_parse(char *arg, unsigned int page_size); +void *storage_init_config(struct settings *s); +int storage_read_config(void *conf, char **subopt); +int storage_check_config(void *conf); +void *storage_init(void *conf); // Ignore pointers and header bits from the CRC #define STORE_OFFSET offsetof(item, nbytes) |