Lines Matching full:nodes

43 …tic void found_btree_nodes_to_text(struct printbuf *out, struct bch_fs *c, found_btree_nodes nodes)  in found_btree_nodes_to_text()  argument
46 darray_for_each(nodes, i) { in found_btree_nodes_to_text()
122 * Given two found btree nodes, if their sequence numbers are equal, take the
201 if (darray_push(&f->nodes, n)) in try_read_btree_node()
358 if (f->nodes.nr) in bch2_scan_for_btree_nodes()
367 if (!f->nodes.nr) { in bch2_scan_for_btree_nodes()
368 bch_err(c, "%s: no btree nodes found", __func__); in bch2_scan_for_btree_nodes()
375 prt_printf(&buf, "%s: nodes found:\n", __func__); in bch2_scan_for_btree_nodes()
376 found_btree_nodes_to_text(&buf, c, f->nodes); in bch2_scan_for_btree_nodes()
380 sort(f->nodes.data, f->nodes.nr, sizeof(f->nodes.data[0]), found_btree_node_cmp_cookie, NULL); in bch2_scan_for_btree_nodes()
383 darray_for_each(f->nodes, i) { in bch2_scan_for_btree_nodes()
384 struct found_btree_node *prev = dst ? f->nodes.data + dst - 1 : NULL; in bch2_scan_for_btree_nodes()
395 f->nodes.data[dst++] = *i; in bch2_scan_for_btree_nodes()
398 f->nodes.nr = dst; in bch2_scan_for_btree_nodes()
400 sort(f->nodes.data, f->nodes.nr, sizeof(f->nodes.data[0]), found_btree_node_cmp_pos, NULL); in bch2_scan_for_btree_nodes()
404 prt_printf(&buf, "%s: nodes after merging replicas:\n", __func__); in bch2_scan_for_btree_nodes()
405 found_btree_nodes_to_text(&buf, c, f->nodes); in bch2_scan_for_btree_nodes()
410 darray_for_each(f->nodes, i) { in bch2_scan_for_btree_nodes()
414 ret = handle_overwrites(c, i, &darray_top(f->nodes)); in bch2_scan_for_btree_nodes()
419 f->nodes.data[dst++] = *i; in bch2_scan_for_btree_nodes()
421 f->nodes.nr = dst; in bch2_scan_for_btree_nodes()
425 prt_printf(&buf, "%s: nodes found after overwrites:\n", __func__); in bch2_scan_for_btree_nodes()
426 found_btree_nodes_to_text(&buf, c, f->nodes); in bch2_scan_for_btree_nodes()
430 …eytzinger0_sort(f->nodes.data, f->nodes.nr, sizeof(f->nodes.data[0]), found_btree_node_cmp_pos, NU… in bch2_scan_for_btree_nodes()
447 for (size_t _idx = eytzinger0_find_gt((_f)->nodes.data, (_f)->nodes.nr, \
448 sizeof((_f)->nodes.data[0]), \
450 _idx < (_f)->nodes.nr && \
451 (_f)->nodes.data[_idx].btree_id == _search.btree_id && \
452 (_f)->nodes.data[_idx].level == _search.level && \
453 bpos_lt((_f)->nodes.data[_idx].min_key, _search.max_key); \
454 _idx = eytzinger0_next(_idx, (_f)->nodes.nr))
468 if (f->nodes.data[idx].seq > BTREE_NODE_SEQ(b->data)) in bch2_btree_node_is_stale()
519 struct found_btree_node n = f->nodes.data[idx]; in bch2_get_scanned_nodes()
548 darray_exit(&f->nodes); in bch2_find_btree_nodes_exit()