Lines Matching refs:format

156 /* Calculate ideal packed bkey format for new btree nodes: */
201 * bch2_btree_node_format_fits - check if we could rewrite node with a new format
206 * @new_f: bkey format to translate keys to
210 * Assumes all keys will successfully pack with the new format.
216 size_t u64s = btree_node_u64s_with_format(nr, &b->format, new_f);
448 struct bkey_format format = bch2_btree_calc_format(b);
451 * The keys might expand with the new format - if they wouldn't fit in
452 * the btree node anymore, use the old format for now:
454 if (!bch2_btree_node_format_fits(as->c, b, b->nr, &format))
455 format = b->format;
462 n->data->format = format;
463 btree_node_set_format(n, format);
478 b->data->format = bch2_btree_calc_format(b);
480 btree_node_set_format(b, b->data->format);
1450 struct bkey_format_state format[2];
1466 bch2_bkey_format_init(&format[i]);
1486 bch2_bkey_format_add_key(&format[i], &uk);
1489 nr_keys[i].val_u64s += bkeyp_val_u64s(&b->format, k);
1498 bch2_bkey_format_add_pos(&format[i], n[i]->data->min_key);
1499 bch2_bkey_format_add_pos(&format[i], n[i]->data->max_key);
1501 n[i]->data->format = bch2_bkey_format_done(&format[i]);
1503 unsigned u64s = nr_keys[i].nr_keys * n[i]->data->format.key_u64s +
1506 n[i]->data->format = b->format;
1508 btree_node_set_format(n[i], n[i]->data->format);
1519 if (bch2_bkey_transform(&n[i]->format, out[i], bkey_packed(k)
1520 ? &b->format: &bch2_bkey_format_current, k))
1521 out[i]->format = KEY_FORMAT_LOCAL_BTREE;
2028 sib_u64s = btree_node_u64s_with_format(b->nr, &b->format, &new_f) +
2029 btree_node_u64s_with_format(m->nr, &m->format, &new_f);
2065 n->data->format = new_f;
2546 b->data->format = bch2_btree_calc_format(b);
2547 btree_node_set_format(b, b->data->format);