summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/bset.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-11-12 07:25:55 +0400
committerKent Overstreet <kmo@daterainc.com>2014-01-09 01:05:13 +0400
commitf67342dd342d5917d94a7c0ffbde5f78e0d7a57a (patch)
tree64472797ad91ae8e9b9e100863b98a69c34bd9a2 /drivers/md/bcache/bset.h
parent59158fde429fb5d18064e2734b3dd5e6048affbd (diff)
downloadlinux-f67342dd342d5917d94a7c0ffbde5f78e0d7a57a.tar.xz
bcache: Refactor bset_tree sysfs stats
We're in the process of turning bset.c into library code, so none of the code in that file should know about struct cache_set or struct btree - so, move the btree traversal part of the stats code to sysfs.c. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/bset.h')
-rw-r--r--drivers/md/bcache/bset.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/md/bcache/bset.h b/drivers/md/bcache/bset.h
index 4fc40fd719de..49135695342e 100644
--- a/drivers/md/bcache/bset.h
+++ b/drivers/md/bcache/bset.h
@@ -365,6 +365,14 @@ static inline void bch_btree_sort(struct btree *b,
bch_btree_sort_partial(b, 0, state);
}
+struct bset_stats {
+ size_t sets_written, sets_unwritten;
+ size_t bytes_written, bytes_unwritten;
+ size_t floats, failed;
+};
+
+void bch_btree_keys_stats(struct btree_keys *, struct bset_stats *);
+
/* Bkey utility code */
#define bset_bkey_last(i) bkey_idx((struct bkey *) (i)->d, (i)->keys)
@@ -495,6 +503,4 @@ int __bch_keylist_realloc(struct keylist *, unsigned);
struct cache_set;
const char *bch_ptr_status(struct cache_set *, const struct bkey *);
-int bch_bset_print_stats(struct cache_set *, char *);
-
#endif