diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-01-24 18:32:13 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:15 -0400 |
commit | fe112812ae41bfed0aa61cdfbe8233e4122e5cb8 (patch) | |
tree | 43d4671d93a21f70d8f89c6c2496166d6787f373 /fs/bcachefs/sysfs.c | |
parent | eac3ca0f49737ba3120ccaa990877b2a05bc88cc (diff) | |
download | lwn-fe112812ae41bfed0aa61cdfbe8233e4122e5cb8.tar.gz lwn-fe112812ae41bfed0aa61cdfbe8233e4122e5cb8.zip |
bcachefs: sysfs trigger for bch2_alloc_write
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sysfs.c')
-rw-r--r-- | fs/bcachefs/sysfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c index a7b4f76d0e61..f33a533ee6b8 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -133,6 +133,7 @@ do { \ write_attribute(trigger_journal_flush); write_attribute(trigger_btree_coalesce); write_attribute(trigger_gc); +write_attribute(trigger_alloc_write); write_attribute(prune_cache); rw_attribute(btree_gc_periodic); @@ -495,6 +496,12 @@ STORE(__bch2_fs) if (attr == &sysfs_trigger_gc) bch2_gc(c, NULL, false); + if (attr == &sysfs_trigger_alloc_write) { + bool wrote; + + bch2_alloc_write(c, false, &wrote); + } + if (attr == &sysfs_prune_cache) { struct shrink_control sc; @@ -587,6 +594,7 @@ struct attribute *bch2_fs_internal_files[] = { &sysfs_trigger_journal_flush, &sysfs_trigger_btree_coalesce, &sysfs_trigger_gc, + &sysfs_trigger_alloc_write, &sysfs_prune_cache, &sysfs_copy_gc_enabled, |