2017-03-16 22:18:50 -08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_MOVINGGC_H
|
|
|
|
#define _BCACHEFS_MOVINGGC_H
|
|
|
|
|
2025-05-08 14:24:12 -04:00
|
|
|
u64 bch2_copygc_wait_amount(struct bch_fs *);
|
2023-03-01 23:10:39 -05:00
|
|
|
void bch2_copygc_wait_to_text(struct printbuf *, struct bch_fs *);
|
|
|
|
|
2025-04-15 10:26:05 -04:00
|
|
|
static inline void bch2_copygc_wakeup(struct bch_fs *c)
|
|
|
|
{
|
2025-05-24 16:33:39 -04:00
|
|
|
guard(rcu)();
|
2025-04-15 10:26:05 -04:00
|
|
|
struct task_struct *p = rcu_dereference(c->copygc_thread);
|
|
|
|
if (p)
|
|
|
|
wake_up_process(p);
|
|
|
|
}
|
|
|
|
|
2020-07-11 16:28:54 -04:00
|
|
|
void bch2_copygc_stop(struct bch_fs *);
|
|
|
|
int bch2_copygc_start(struct bch_fs *);
|
|
|
|
void bch2_fs_copygc_init(struct bch_fs *);
|
2017-03-16 22:18:50 -08:00
|
|
|
|
|
|
|
#endif /* _BCACHEFS_MOVINGGC_H */
|