mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

The new guard(), scoped_guard() allow for more natural code. Some of the uses with creative flow control have been left. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
20 lines
536 B
C
20 lines
536 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _BCACHEFS_MOVINGGC_H
|
|
#define _BCACHEFS_MOVINGGC_H
|
|
|
|
u64 bch2_copygc_wait_amount(struct bch_fs *);
|
|
void bch2_copygc_wait_to_text(struct printbuf *, struct bch_fs *);
|
|
|
|
static inline void bch2_copygc_wakeup(struct bch_fs *c)
|
|
{
|
|
guard(rcu)();
|
|
struct task_struct *p = rcu_dereference(c->copygc_thread);
|
|
if (p)
|
|
wake_up_process(p);
|
|
}
|
|
|
|
void bch2_copygc_stop(struct bch_fs *);
|
|
int bch2_copygc_start(struct bch_fs *);
|
|
void bch2_fs_copygc_init(struct bch_fs *);
|
|
|
|
#endif /* _BCACHEFS_MOVINGGC_H */
|