Commit fe112812 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: sysfs trigger for bch2_alloc_write

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent eac3ca0f
...@@ -133,6 +133,7 @@ do { \ ...@@ -133,6 +133,7 @@ do { \
write_attribute(trigger_journal_flush); write_attribute(trigger_journal_flush);
write_attribute(trigger_btree_coalesce); write_attribute(trigger_btree_coalesce);
write_attribute(trigger_gc); write_attribute(trigger_gc);
write_attribute(trigger_alloc_write);
write_attribute(prune_cache); write_attribute(prune_cache);
rw_attribute(btree_gc_periodic); rw_attribute(btree_gc_periodic);
...@@ -495,6 +496,12 @@ STORE(__bch2_fs) ...@@ -495,6 +496,12 @@ STORE(__bch2_fs)
if (attr == &sysfs_trigger_gc) if (attr == &sysfs_trigger_gc)
bch2_gc(c, NULL, false); bch2_gc(c, NULL, false);
if (attr == &sysfs_trigger_alloc_write) {
bool wrote;
bch2_alloc_write(c, false, &wrote);
}
if (attr == &sysfs_prune_cache) { if (attr == &sysfs_prune_cache) {
struct shrink_control sc; struct shrink_control sc;
...@@ -587,6 +594,7 @@ struct attribute *bch2_fs_internal_files[] = { ...@@ -587,6 +594,7 @@ struct attribute *bch2_fs_internal_files[] = {
&sysfs_trigger_journal_flush, &sysfs_trigger_journal_flush,
&sysfs_trigger_btree_coalesce, &sysfs_trigger_btree_coalesce,
&sysfs_trigger_gc, &sysfs_trigger_gc,
&sysfs_trigger_alloc_write,
&sysfs_prune_cache, &sysfs_prune_cache,
&sysfs_copy_gc_enabled, &sysfs_copy_gc_enabled,
......
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