]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
bcache: Move couple of string arrays to sysfs.c
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 28 May 2018 07:37:42 +0000 (15:37 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1784665
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 04cbc21137bfa4d7b8771a5b14f3d6c9b2aee671)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/md/bcache/bcache.h
drivers/md/bcache/super.c
drivers/md/bcache/sysfs.c

index f13f898f47b51ce481823600b34da328a25ca19f..65197dfa39832a0cf186fa3b090515276eeb5481 100644 (file)
@@ -947,8 +947,6 @@ void bch_prio_write(struct cache *);
 void bch_write_bdev_super(struct cached_dev *, struct closure *);
 
 extern struct workqueue_struct *bcache_wq;
-extern const char * const bch_cache_modes[];
-extern const char * const bch_stop_on_failure_modes[];
 extern struct mutex bch_register_lock;
 extern struct list_head bch_cache_sets;
 
index 51d1165c827e16b16edccc36eeae2ba8b8407ea3..2fd84312fc09a0ed9e3b9e034acb27151e901bd5 100644 (file)
@@ -37,24 +37,6 @@ static const char invalid_uuid[] = {
        0xc8, 0x50, 0xfc, 0x5e, 0xcb, 0x16, 0xcd, 0x99
 };
 
-/* 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
-};
-
-/* Default is -1; we skip past it for stop_when_cache_set_failed */
-const char * const bch_stop_on_failure_modes[] = {
-       "default",
-       "auto",
-       "always",
-       NULL
-};
-
 static struct kobject *bcache_kobj;
 struct mutex bch_register_lock;
 LIST_HEAD(bch_cache_sets);
index beb1ddfa8f5a1a83e14ee62c4feab321d8e91d82..f4150eba2101a472bfc44cf9212ff0dbe5d056e0 100644 (file)
 #include <linux/sort.h>
 #include <linux/sched/clock.h>
 
+/* 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",