summaryrefslogtreecommitdiff
path: root/libbcache/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcache/opts.c')
-rw-r--r--libbcache/opts.c46
1 files changed, 36 insertions, 10 deletions
diff --git a/libbcache/opts.c b/libbcache/opts.c
index 249dd5d..60a2a4d 100644
--- a/libbcache/opts.c
+++ b/libbcache/opts.c
@@ -4,16 +4,6 @@
#include "opts.h"
#include "util.h"
-const char * const bch_bool_opt[] = {
- "0",
- "1",
- NULL
-};
-
-const char * const bch_uint_opt[] = {
- NULL
-};
-
const char * const bch_error_actions[] = {
"continue",
"remount-ro",
@@ -43,6 +33,42 @@ const char * const bch_str_hash_types[] = {
NULL
};
+const char * const bch_cache_replacement_policies[] = {
+ "lru",
+ "fifo",
+ "random",
+ NULL
+};
+
+/* Default is -1; we skip past it for struct cached_dev's cache mode */
+const char * const bch_cache_modes[] = {
+ "default",
+ "writethrough",
+ "writeback",
+ "writearound",
+ "none",
+ NULL
+};
+
+const char * const bch_cache_state[] = {
+ "active",
+ "readonly",
+ "failed",
+ "spare",
+ NULL
+};
+
+
+const char * const bch_bool_opt[] = {
+ "0",
+ "1",
+ NULL
+};
+
+const char * const bch_uint_opt[] = {
+ NULL
+};
+
enum bch_opts {
#define CACHE_SET_OPT(_name, _choices, _min, _max, _sb_opt, _perm) \
Opt_##_name,