summaryrefslogtreecommitdiff
path: root/fs/bcachefs/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-07-11 23:11:45 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-15 02:00:11 +0300
commitd06a26d24db090d8be0ea4c9bfa1457e334940b7 (patch)
treedd9f3a54a8450e4c8ebd9aa316e5f6eee3ba57b1 /fs/bcachefs/sysfs.c
parenta1e7a97f22bf688a1234e698d342726e70f8a25b (diff)
downloadlinux-d06a26d24db090d8be0ea4c9bfa1457e334940b7.tar.xz
bcachefs: sysfs trigger_freelist_wakeup
another debugging knob Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r--fs/bcachefs/sysfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 3f54203f0499..97e9ef4acc49 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -143,6 +143,7 @@ write_attribute(trigger_journal_flush);
write_attribute(trigger_journal_writes);
write_attribute(trigger_btree_cache_shrink);
write_attribute(trigger_btree_key_cache_shrink);
+write_attribute(trigger_freelist_wakeup);
rw_attribute(gc_gens_pos);
read_attribute(uuid);
@@ -501,6 +502,9 @@ STORE(bch2_fs)
if (attr == &sysfs_trigger_journal_writes)
bch2_journal_do_writes(&c->journal);
+ if (attr == &sysfs_trigger_freelist_wakeup)
+ closure_wake_up(&c->freelist_wait);
+
#ifdef CONFIG_BCACHEFS_TESTS
if (attr == &sysfs_perf_test) {
char *tmp = kstrdup(buf, GFP_KERNEL), *p = tmp;
@@ -622,6 +626,7 @@ struct attribute *bch2_fs_internal_files[] = {
&sysfs_trigger_journal_writes,
&sysfs_trigger_btree_cache_shrink,
&sysfs_trigger_btree_key_cache_shrink,
+ &sysfs_trigger_freelist_wakeup,
&sysfs_gc_gens_pos,