]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/rebalance.h
Update bcachefs sources to 504729f99c bcachefs: Allow answering y or n to all fsck...
[bcachefs-tools-debian] / libbcachefs / rebalance.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_REBALANCE_H
3 #define _BCACHEFS_REBALANCE_H
4
5 #include "rebalance_types.h"
6
7 static inline void rebalance_wakeup(struct bch_fs *c)
8 {
9         struct task_struct *p;
10
11         rcu_read_lock();
12         p = rcu_dereference(c->rebalance.thread);
13         if (p)
14                 wake_up_process(p);
15         rcu_read_unlock();
16 }
17
18 void bch2_rebalance_add_key(struct bch_fs *, struct bkey_s_c,
19                             struct bch_io_opts *);
20 void bch2_rebalance_add_work(struct bch_fs *, u64);
21
22 void bch2_rebalance_work_to_text(struct printbuf *, struct bch_fs *);
23
24 void bch2_rebalance_stop(struct bch_fs *);
25 int bch2_rebalance_start(struct bch_fs *);
26 void bch2_fs_rebalance_init(struct bch_fs *);
27
28 #endif /* _BCACHEFS_REBALANCE_H */