2017-03-17 06:18:50 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_MOVE_TYPES_H
|
|
|
|
#define _BCACHEFS_MOVE_TYPES_H
|
|
|
|
|
2023-10-23 19:36:45 +00:00
|
|
|
#include "bbpos_types.h"
|
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
struct bch_move_stats {
|
|
|
|
enum bch_data_type data_type;
|
2023-10-23 19:36:45 +00:00
|
|
|
struct bbpos pos;
|
2021-07-23 19:57:19 +00:00
|
|
|
char name[32];
|
2017-03-17 06:18:50 +00:00
|
|
|
|
|
|
|
atomic64_t keys_moved;
|
2020-06-04 03:47:50 +00:00
|
|
|
atomic64_t keys_raced;
|
2017-03-17 06:18:50 +00:00
|
|
|
atomic64_t sectors_seen;
|
2023-10-23 20:21:54 +00:00
|
|
|
atomic64_t sectors_moved;
|
2017-03-17 06:18:50 +00:00
|
|
|
atomic64_t sectors_raced;
|
|
|
|
};
|
|
|
|
|
2023-03-11 19:44:41 +00:00
|
|
|
struct move_bucket_key {
|
2023-02-28 03:58:01 +00:00
|
|
|
struct bpos bucket;
|
|
|
|
u8 gen;
|
2023-03-11 19:44:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct move_bucket {
|
|
|
|
struct move_bucket_key k;
|
|
|
|
unsigned sectors;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct move_bucket_in_flight {
|
|
|
|
struct move_bucket_in_flight *next;
|
|
|
|
struct rhash_head hash;
|
|
|
|
struct move_bucket bucket;
|
2023-02-28 03:58:01 +00:00
|
|
|
atomic_t count;
|
|
|
|
};
|
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
#endif /* _BCACHEFS_MOVE_TYPES_H */
|