Commit a1d97d84 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix shrinker names

Shrinkers are now exported to debugfs, so the names can't have slashes
in them.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 50a38ca1
...@@ -476,7 +476,7 @@ int bch2_fs_btree_cache_init(struct bch_fs *c) ...@@ -476,7 +476,7 @@ int bch2_fs_btree_cache_init(struct bch_fs *c)
bc->shrink.count_objects = bch2_btree_cache_count; bc->shrink.count_objects = bch2_btree_cache_count;
bc->shrink.scan_objects = bch2_btree_cache_scan; bc->shrink.scan_objects = bch2_btree_cache_scan;
bc->shrink.seeks = 4; bc->shrink.seeks = 4;
ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name); ret = register_shrinker(&bc->shrink, "%s-btree_cache", c->name);
if (ret) if (ret)
goto err; goto err;
......
...@@ -1042,7 +1042,7 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc) ...@@ -1042,7 +1042,7 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
bc->shrink.seeks = 0; bc->shrink.seeks = 0;
bc->shrink.count_objects = bch2_btree_key_cache_count; bc->shrink.count_objects = bch2_btree_key_cache_count;
bc->shrink.scan_objects = bch2_btree_key_cache_scan; bc->shrink.scan_objects = bch2_btree_key_cache_scan;
if (register_shrinker(&bc->shrink, "%s/btree_key_cache", c->name)) if (register_shrinker(&bc->shrink, "%s-btree_key_cache", c->name))
return -BCH_ERR_ENOMEM_fs_btree_cache_init; return -BCH_ERR_ENOMEM_fs_btree_cache_init;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment