Commit | Line | Data |
---|---|---|
1c6fdbd8 KO |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef _BCACHEFS_REBALANCE_TYPES_H | |
3 | #define _BCACHEFS_REBALANCE_TYPES_H | |
4 | ||
5 | #include "move_types.h" | |
6 | ||
7 | enum rebalance_state { | |
8 | REBALANCE_WAITING, | |
9 | REBALANCE_THROTTLED, | |
10 | REBALANCE_RUNNING, | |
11 | }; | |
12 | ||
13 | struct bch_fs_rebalance { | |
14 | struct task_struct __rcu *thread; | |
15 | struct bch_pd_controller pd; | |
16 | ||
17 | atomic64_t work_unknown_dev; | |
18 | ||
19 | enum rebalance_state state; | |
2abe5420 | 20 | u64 throttled_until_iotime; |
1c6fdbd8 | 21 | unsigned long throttled_until_cputime; |
1c6fdbd8 KO |
22 | |
23 | unsigned enabled:1; | |
24 | }; | |
25 | ||
26 | #endif /* _BCACHEFS_REBALANCE_TYPES_H */ |