Lines Matching defs:pn
430 struct btree_node *ln, *rn, *pn;
463 pn = dm_block_data(parent);
466 memcpy_disk(value_ptr(pn, parent_index),
472 r = insert_at(sizeof(__le64), pn, parent_index + 1,
515 struct btree_node *pn, *ln, *rn;
530 pn = dm_block_data(new_parent);
534 nr_left = le32_to_cpu(pn->header.nr_entries) / 2;
535 nr_right = le32_to_cpu(pn->header.nr_entries) - nr_left;
537 ln->header.flags = pn->header.flags;
539 ln->header.max_entries = pn->header.max_entries;
540 ln->header.value_size = pn->header.value_size;
542 rn->header.flags = pn->header.flags;
544 rn->header.max_entries = pn->header.max_entries;
545 rn->header.value_size = pn->header.value_size;
547 memcpy(ln->keys, pn->keys, nr_left * sizeof(pn->keys[0]));
548 memcpy(rn->keys, pn->keys + nr_left, nr_right * sizeof(pn->keys[0]));
550 size = le32_to_cpu(pn->header.flags) & INTERNAL_NODE ?
552 memcpy(value_ptr(ln, 0), value_ptr(pn, 0), nr_left * size);
553 memcpy(value_ptr(rn, 0), value_ptr(pn, nr_left),
557 pn->header.flags = cpu_to_le32(INTERNAL_NODE);
558 pn->header.nr_entries = cpu_to_le32(2);
559 pn->header.max_entries = cpu_to_le32(
563 pn->header.value_size = cpu_to_le32(sizeof(__le64));
567 pn->keys[0] = ln->keys[0];
568 memcpy_disk(value_ptr(pn, 0), &val, sizeof(__le64));
572 pn->keys[1] = rn->keys[0];
573 memcpy_disk(value_ptr(pn, 1), &val, sizeof(__le64));