summaryrefslogtreecommitdiff
path: root/storage.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2020-08-29 23:15:23 -0700
committerdormando <dormando@rydia.net>2020-10-30 15:50:12 -0700
commit416a7a10014299fd08bf4b35e4ffa0870cd330b0 (patch)
tree6c767d9538b00bae8a393e609a73790e015d6610 /storage.h
parentdf49d38930a32d342e1a3ab980c1ec432d138c2c (diff)
downloadmemcached-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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/storage.h b/storage.h
index 7bcaf62..47e3043 100644
--- a/storage.h
+++ b/storage.h
@@ -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)