diff options
Diffstat (limited to 'drivers/md/bcache/sysfs.c')
-rw-r--r-- | drivers/md/bcache/sysfs.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c index 5c7e77073b1f..4d9cca47e4c6 100644 --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c | |||
@@ -105,9 +105,9 @@ SHOW(__bch_cached_dev) | |||
105 | #define var(stat) (dc->stat) | 105 | #define var(stat) (dc->stat) |
106 | 106 | ||
107 | if (attr == &sysfs_cache_mode) | 107 | if (attr == &sysfs_cache_mode) |
108 | return snprint_string_list(buf, PAGE_SIZE, | 108 | return bch_snprint_string_list(buf, PAGE_SIZE, |
109 | bch_cache_modes + 1, | 109 | bch_cache_modes + 1, |
110 | BDEV_CACHE_MODE(&dc->sb)); | 110 | BDEV_CACHE_MODE(&dc->sb)); |
111 | 111 | ||
112 | sysfs_printf(data_csum, "%i", dc->disk.data_csum); | 112 | sysfs_printf(data_csum, "%i", dc->disk.data_csum); |
113 | var_printf(verify, "%i"); | 113 | var_printf(verify, "%i"); |
@@ -126,10 +126,10 @@ SHOW(__bch_cached_dev) | |||
126 | char dirty[20]; | 126 | char dirty[20]; |
127 | char derivative[20]; | 127 | char derivative[20]; |
128 | char target[20]; | 128 | char target[20]; |
129 | hprint(dirty, | 129 | bch_hprint(dirty, |
130 | atomic_long_read(&dc->disk.sectors_dirty) << 9); | 130 | atomic_long_read(&dc->disk.sectors_dirty) << 9); |
131 | hprint(derivative, dc->writeback_rate_derivative << 9); | 131 | bch_hprint(derivative, dc->writeback_rate_derivative << 9); |
132 | hprint(target, dc->writeback_rate_target << 9); | 132 | bch_hprint(target, dc->writeback_rate_target << 9); |
133 | 133 | ||
134 | return sprintf(buf, | 134 | return sprintf(buf, |
135 | "rate:\t\t%u\n" | 135 | "rate:\t\t%u\n" |
@@ -202,7 +202,7 @@ STORE(__cached_dev) | |||
202 | bch_cached_dev_run(dc); | 202 | bch_cached_dev_run(dc); |
203 | 203 | ||
204 | if (attr == &sysfs_cache_mode) { | 204 | if (attr == &sysfs_cache_mode) { |
205 | ssize_t v = read_string_list(buf, bch_cache_modes + 1); | 205 | ssize_t v = bch_read_string_list(buf, bch_cache_modes + 1); |
206 | 206 | ||
207 | if (v < 0) | 207 | if (v < 0) |
208 | return v; | 208 | return v; |
@@ -224,7 +224,7 @@ STORE(__cached_dev) | |||
224 | } | 224 | } |
225 | 225 | ||
226 | if (attr == &sysfs_attach) { | 226 | if (attr == &sysfs_attach) { |
227 | if (parse_uuid(buf, dc->sb.set_uuid) < 16) | 227 | if (bch_parse_uuid(buf, dc->sb.set_uuid) < 16) |
228 | return -EINVAL; | 228 | return -EINVAL; |
229 | 229 | ||
230 | list_for_each_entry(c, &bch_cache_sets, list) { | 230 | list_for_each_entry(c, &bch_cache_sets, list) { |
@@ -657,9 +657,9 @@ SHOW(__bch_cache) | |||
657 | ((size_t) ca->sb.nbuckets)); | 657 | ((size_t) ca->sb.nbuckets)); |
658 | 658 | ||
659 | if (attr == &sysfs_cache_replacement_policy) | 659 | if (attr == &sysfs_cache_replacement_policy) |
660 | return snprint_string_list(buf, PAGE_SIZE, | 660 | return bch_snprint_string_list(buf, PAGE_SIZE, |
661 | cache_replacement_policies, | 661 | cache_replacement_policies, |
662 | CACHE_REPLACEMENT(&ca->sb)); | 662 | CACHE_REPLACEMENT(&ca->sb)); |
663 | 663 | ||
664 | if (attr == &sysfs_priority_stats) { | 664 | if (attr == &sysfs_priority_stats) { |
665 | int cmp(const void *l, const void *r) | 665 | int cmp(const void *l, const void *r) |
@@ -747,7 +747,7 @@ STORE(__bch_cache) | |||
747 | } | 747 | } |
748 | 748 | ||
749 | if (attr == &sysfs_cache_replacement_policy) { | 749 | if (attr == &sysfs_cache_replacement_policy) { |
750 | ssize_t v = read_string_list(buf, cache_replacement_policies); | 750 | ssize_t v = bch_read_string_list(buf, cache_replacement_policies); |
751 | 751 | ||
752 | if (v < 0) | 752 | if (v < 0) |
753 | return v; | 753 | return v; |