diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-19 22:44:12 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-08 17:29:20 -0400 |
| commit | 103304021e54bfb5cab9ba04cd5ef0dc2bf33888 (patch) | |
| tree | 290f599143bec9f28307836245a152dd19db992b /fs/bcachefs/btree_gc.h | |
| parent | b25fd02ab4edb0193e60754626704adacbfbeefb (diff) | |
| download | linux-103304021e54bfb5cab9ba04cd5ef0dc2bf33888.tar.gz linux-103304021e54bfb5cab9ba04cd5ef0dc2bf33888.tar.bz2 linux-103304021e54bfb5cab9ba04cd5ef0dc2bf33888.zip | |
bcachefs: Move gc of bucket.oldest_gen to workqueue
This is a nice cleanup - and we've also been having problems with
kthread creation in the mount path.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_gc.h')
| -rw-r--r-- | fs/bcachefs/btree_gc.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/bcachefs/btree_gc.h b/fs/bcachefs/btree_gc.h index 0d6c0a2df613..15315aab93bd 100644 --- a/fs/bcachefs/btree_gc.h +++ b/fs/bcachefs/btree_gc.h @@ -7,9 +7,6 @@ int bch2_check_topology(struct bch_fs *); int bch2_check_allocations(struct bch_fs *); -int bch2_gc_gens(struct bch_fs *); -void bch2_gc_thread_stop(struct bch_fs *); -int bch2_gc_thread_start(struct bch_fs *); /* * For concurrent mark and sweep (with other index updates), we define a total @@ -104,11 +101,8 @@ static inline bool gc_visited(struct bch_fs *c, struct gc_pos pos) return ret; } -static inline void bch2_do_gc_gens(struct bch_fs *c) -{ - atomic_inc(&c->kick_gc); - if (c->gc_thread) - wake_up_process(c->gc_thread); -} +int bch2_gc_gens(struct bch_fs *); +void bch2_gc_gens_async(struct bch_fs *); +void bch2_fs_gc_init(struct bch_fs *); #endif /* _BCACHEFS_BTREE_GC_H */ |
