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 unsigned sectors_written; 13 u32 seq; 14 u64 journal_seq; 15 u64 cookie; 16 17 struct bpos min_key; 18 struct bpos max_key; 19 20 unsigned nr_ptrs; 21 struct bch_extent_ptr ptrs[BCH_REPLICAS_MAX]; 22 }; 23 24 typedef DARRAY(struct found_btree_node) found_btree_nodes; 25 26 struct find_btree_nodes { 27 int ret; 28 struct mutex lock; 29 found_btree_nodes nodes; 30 }; 31 32 #endif /* _BCACHEFS_BTREE_NODE_SCAN_TYPES_H */ 33