Linux 6.13-rc4
[linux.git] / fs / bcachefs / rebalance.h
blob28a52638f16cc113848cf3925758e12d510dc247
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_REBALANCE_H
3 #define _BCACHEFS_REBALANCE_H
5 #include "rebalance_types.h"
7 int bch2_set_rebalance_needs_scan(struct bch_fs *, u64 inum);
8 int bch2_set_fs_needs_rebalance(struct bch_fs *);
10 static inline void rebalance_wakeup(struct bch_fs *c)
12 struct task_struct *p;
14 rcu_read_lock();
15 p = rcu_dereference(c->rebalance.thread);
16 if (p)
17 wake_up_process(p);
18 rcu_read_unlock();
21 void bch2_rebalance_status_to_text(struct printbuf *, struct bch_fs *);
23 void bch2_rebalance_stop(struct bch_fs *);
24 int bch2_rebalance_start(struct bch_fs *);
25 void bch2_fs_rebalance_init(struct bch_fs *);
27 #endif /* _BCACHEFS_REBALANCE_H */