1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #ifndef _BCACHEFS_BTREE_NODE_SCAN_TYPES_H |
3 | #define _BCACHEFS_BTREE_NODE_SCAN_TYPES_H |
4 | |
5 | #include "darray.h" |
6 | |
7 | struct found_btree_node { |
8 | bool range_updated:1; |
9 | bool overwritten:1; |
10 | u8 btree_id; |
11 | u8 level; |
12 | u32 seq; |
13 | u64 cookie; |
14 | |
15 | struct bpos min_key; |
16 | struct bpos max_key; |
17 | |
18 | unsigned nr_ptrs; |
19 | struct bch_extent_ptr ptrs[BCH_REPLICAS_MAX]; |
20 | }; |
21 | |
22 | typedef DARRAY(struct found_btree_node) found_btree_nodes; |
23 | |
24 | struct find_btree_nodes { |
25 | int ret; |
26 | struct mutex lock; |
27 | found_btree_nodes nodes; |
28 | }; |
29 | |
30 | #endif /* _BCACHEFS_BTREE_NODE_SCAN_TYPES_H */ |
31 | |