1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_MOVE_TYPES_H
3#define _BCACHEFS_MOVE_TYPES_H
4
5#include "bbpos_types.h"
6
7struct bch_move_stats {
8 enum bch_data_type data_type;
9 struct bbpos pos;
10 char name[32];
11
12 atomic64_t keys_moved;
13 atomic64_t keys_raced;
14 atomic64_t sectors_seen;
15 atomic64_t sectors_moved;
16 atomic64_t sectors_raced;
17};
18
19struct move_bucket_key {
20 struct bpos bucket;
21 u8 gen;
22};
23
24struct move_bucket {
25 struct move_bucket_key k;
26 unsigned sectors;
27};
28
29struct move_bucket_in_flight {
30 struct move_bucket_in_flight *next;
31 struct rhash_head hash;
32 struct move_bucket bucket;
33 atomic_t count;
34};
35
36#endif /* _BCACHEFS_MOVE_TYPES_H */
37

source code of linux/fs/bcachefs/move_types.h