summaryrefslogtreecommitdiff
path: root/libbcachefs/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-07 16:40:18 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-07 16:41:50 -0400
commit147fb2ac5dc4f08c38c5011ea1a99c2298abb280 (patch)
treee83b4d0b8a980292b18e3ef505a92e28ae2b33c4 /libbcachefs/sysfs.c
parent51315289f249fa5569a776eaa98c7ee557b61077 (diff)
Update bcachefs sources to 17baec961add fixup! bcachefs: opts.rebalance_on_ac_onlynoradtux-debug
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/sysfs.c')
-rw-r--r--libbcachefs/sysfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbcachefs/sysfs.c b/libbcachefs/sysfs.c
index eafaa2c8..11da5e54 100644
--- a/libbcachefs/sysfs.c
+++ b/libbcachefs/sysfs.c
@@ -150,6 +150,7 @@ write_attribute(trigger_btree_key_cache_shrink);
write_attribute(trigger_btree_updates);
write_attribute(trigger_freelist_wakeup);
write_attribute(trigger_recalc_capacity);
+write_attribute(trigger_delete_dead_snapshots);
read_attribute(gc_gens_pos);
__sysfs_attribute(read_fua_test, 0400);
@@ -551,6 +552,9 @@ STORE(bch2_fs)
up_read(&c->state_lock);
}
+ if (attr == &sysfs_trigger_delete_dead_snapshots)
+ __bch2_delete_dead_snapshots(c);
+
#ifdef CONFIG_BCACHEFS_TESTS
if (attr == &sysfs_perf_test) {
char *tmp = kstrdup(buf, GFP_KERNEL), *p = tmp;
@@ -680,6 +684,7 @@ struct attribute *bch2_fs_internal_files[] = {
&sysfs_trigger_btree_updates,
&sysfs_trigger_freelist_wakeup,
&sysfs_trigger_recalc_capacity,
+ &sysfs_trigger_delete_dead_snapshots,
&sysfs_gc_gens_pos,