bcachefs: btree node scan now fills in sectors_written
[linux-2.6-block.git] / fs / bcachefs / btree_node_scan_types.h
CommitLineData
4409b808
KO
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
7struct found_btree_node {
8 bool range_updated:1;
9 bool overwritten:1;
10 u8 btree_id;
11 u8 level;
f7c3dc26 12 unsigned sectors_written;
4409b808
KO
13 u32 seq;
14 u64 cookie;
15
16 struct bpos min_key;
17 struct bpos max_key;
18
19 unsigned nr_ptrs;
20 struct bch_extent_ptr ptrs[BCH_REPLICAS_MAX];
21};
22
23typedef DARRAY(struct found_btree_node) found_btree_nodes;
24
25struct find_btree_nodes {
26 int ret;
27 struct mutex lock;
28 found_btree_nodes nodes;
29};
30
31#endif /* _BCACHEFS_BTREE_NODE_SCAN_TYPES_H */