summaryrefslogtreecommitdiff
path: root/libbcache/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-02-01 18:16:42 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-02-06 20:45:37 -0900
commit5933f9478cc21e8b319309d2794948050d09b031 (patch)
tree781509d106b4aa5c99dda7e88028b58baf6de786 /libbcache/sysfs.c
parentab88049a08bf734b9a6c9f2deae39fbd0c933192 (diff)
update bcache code, fsck improvements
Diffstat (limited to 'libbcache/sysfs.c')
-rw-r--r--libbcache/sysfs.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/libbcache/sysfs.c b/libbcache/sysfs.c
index 40d006b4..58a71259 100644
--- a/libbcache/sysfs.c
+++ b/libbcache/sysfs.c
@@ -24,31 +24,6 @@
#include <linux/blkdev.h>
#include <linux/sort.h>
-static const char * const cache_replacement_policies[] = {
- "lru",
- "fifo",
- "random",
- NULL
-};
-
-/* Default is -1; we skip past it for struct cached_dev's cache mode */
-static const char * const bch_cache_modes[] = {
- "default",
- "writethrough",
- "writeback",
- "writearound",
- "none",
- NULL
-};
-
-static const char * const bch_cache_state[] = {
- "active",
- "readonly",
- "failed",
- "spare",
- NULL
-};
-
write_attribute(attach);
write_attribute(detach);
write_attribute(unregister);
@@ -1237,7 +1212,7 @@ SHOW(bch_cache)
if (attr == &sysfs_cache_replacement_policy)
return bch_snprint_string_list(buf, PAGE_SIZE,
- cache_replacement_policies,
+ bch_cache_replacement_policies,
ca->mi.replacement);
sysfs_print(tier, ca->mi.tier);
@@ -1281,7 +1256,7 @@ STORE(__bch_cache)
}
if (attr == &sysfs_cache_replacement_policy) {
- ssize_t v = bch_read_string_list(buf, cache_replacement_policies);
+ ssize_t v = bch_read_string_list(buf, bch_cache_replacement_policies);
if (v < 0)
return v;