From 04cbc21137bfa4d7b8771a5b14f3d6c9b2aee671 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 28 May 2018 15:37:42 +0800 Subject: bcache: Move couple of string arrays to sysfs.c There is couple of string arrays that are used exclusively in sysfs.c. Move it to there and make them static. Besides above, it will allow further clean up. No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Coly Li Signed-off-by: Jens Axboe --- drivers/md/bcache/sysfs.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/md/bcache/sysfs.c') diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index dfeef583ee50..0275450a0da9 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c @@ -16,6 +16,24 @@ #include #include +/* 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 +}; + +/* Default is -1; we skip past it for stop_when_cache_set_failed */ +static const char * const bch_stop_on_failure_modes[] = { + "default", + "auto", + "always", + NULL +}; + static const char * const cache_replacement_policies[] = { "lru", "fifo", -- cgit v1.2.1