summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/md/bcache/opts.c8
-rw-r--r--drivers/md/bcache/opts.h1
-rw-r--r--include/uapi/linux/bcache.h7
3 files changed, 15 insertions, 1 deletions
diff --git a/drivers/md/bcache/opts.c b/drivers/md/bcache/opts.c
index 5010e55c06e7..523b395d65a3 100644
--- a/drivers/md/bcache/opts.c
+++ b/drivers/md/bcache/opts.c
@@ -35,6 +35,14 @@ const char * const bch_compression_types[] = {
NULL
};
+const char * const bch_str_hash_types[] = {
+ "crc32c",
+ "crc64",
+ "siphash",
+ "sha1",
+ NULL
+};
+
enum bch_opts {
#define CACHE_SET_OPT(_name, _bits, _options, _sb_opt, _perm) \
Opt_##_name,
diff --git a/drivers/md/bcache/opts.h b/drivers/md/bcache/opts.h
index a17dc6ff1735..87a1a290babe 100644
--- a/drivers/md/bcache/opts.h
+++ b/drivers/md/bcache/opts.h
@@ -23,6 +23,7 @@ extern const char * const bch_uint_opt[];
extern const char * const bch_error_actions[];
extern const char * const bch_csum_types[];
extern const char * const bch_compression_types[];
+extern const char * const bch_str_hash_types[];
/* dummy option, for options that aren't stored in the superblock */
LE64_BITMASK(NO_SB_OPT, struct cache_sb, flags, 0, 0);
diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h
index e2ac852913e9..6646cd98969d 100644
--- a/include/uapi/linux/bcache.h
+++ b/include/uapi/linux/bcache.h
@@ -827,7 +827,12 @@ enum {
bch_compression_types, \
BCH_COMPRESSION_NR, \
CACHE_COMPRESSION_TYPE, \
- true)
+ true) \
+ CACHE_SET_OPT(str_hash, \
+ bch_str_hash_types, \
+ BCH_STR_HASH_NR, \
+ CACHE_SET_STR_HASH_TYPE, \
+ true) \
/* backing device specific stuff: */