]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/move_types.h
Update bcachefs sources to 24bdb6fed91c bcachefs: bch2_btree_id_str()
[bcachefs-tools-debian] / libbcachefs / move_types.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_MOVE_TYPES_H
3 #define _BCACHEFS_MOVE_TYPES_H
4
5 struct bch_move_stats {
6         enum bch_data_type      data_type;
7         enum btree_id           btree_id;
8         struct bpos             pos;
9         struct list_head        list;
10         char                    name[32];
11
12         atomic64_t              keys_moved;
13         atomic64_t              keys_raced;
14         atomic64_t              sectors_moved;
15         atomic64_t              sectors_seen;
16         atomic64_t              sectors_raced;
17 };
18
19 struct move_bucket_key {
20         struct bpos             bucket;
21         u8                      gen;
22 };
23
24 struct move_bucket {
25         struct move_bucket_key  k;
26         unsigned                sectors;
27 };
28
29 struct 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 */