Lines Matching defs:slot

88 BTree::Node::SearchSlot(const btrfs_key& key, int* slot, btree_traversing type)
91 // binary search for item slot in a node
111 *slot = mid;
128 *slot = mid;
129 TRACE("SearchSlot() found slot %" B_PRId32 " comp %" B_PRId32 "\n",
130 *slot, comp);
331 BTree::Path::SetNode(off_t block, int slot)
334 return SetNode(&node, slot);
339 BTree::Path::SetNode(const Node* node, int slot)
349 if (slot == -1)
352 fSlots[level] = slot;
370 BTree::Path::GetEntry(int slot, btrfs_key* _key, void** _value, uint32* _size,
374 if (slot < 0 || slot >= leaf->ItemCount())
378 *_key = leaf->Item(slot)->key;
380 uint32 itemSize = leaf->Item(slot)->Size();
386 memcpy(*_value, leaf->ItemData(slot), itemSize);
393 *_offset = leaf->Item(slot)->Offset();
400 BTree::Path::SetEntry(int slot, const btrfs_entry& entry, void* value)
402 if (slot < 0)
405 memcpy(fNodes[0]->Item(slot), &entry, sizeof(btrfs_entry));
406 memcpy(fNodes[0]->ItemData(slot), value, entry.Size());
580 int slot;
586 status = node.SearchSlot(key, &slot, BTREE_BACKWARD);
589 if (path->SetNode(&node, slot) == NULL)
592 TRACE("BTree::Traverse() getting index %" B_PRIu32 "\n", slot);
594 status = fVolume->FindBlock(node.Index(slot)->LogicalAddress(),
598 node.Index(slot)->LogicalAddress());
605 status = node.SearchSlot(key, &slot, type);
608 if (path->SetNode(&node, slot) == NULL)
612 node.Item(slot)->Offset(), node.Item(slot)->Size());
613 return slot;
679 int slot = status;
684 status = path->CopyOnWrite(transaction, 0, slot, num, length);
692 return slot;
704 status_t slot = MakeEntries(transaction, path, entries[0].key, num,
706 if (slot < B_OK)
707 return slot;
710 if (slot > 0) {
711 path->GetEntry(slot - 1, NULL, NULL, NULL, &upperLimit);
720 path->SetEntry(slot + i, entries[i], data[i]);
739 int slot = status;
743 path->GetEntry(slot + i, NULL, &_data[i], &itemSize);
751 status = path->CopyOnWrite(transaction, 0, slot, num, length);
765 int slot;
769 node = path->GetNode(level, &slot);
770 if (node == NULL || slot != 0)
782 // change all nodes below this level and slot to the ending
785 node->Index(slot)->LogicalAddress(), physicalBlock);
792 slot = node->ItemCount() - 1;
804 int slot;
808 node = path->GetNode(level, &slot);
809 if (node == NULL || slot < node->ItemCount() - 1)
821 // change all nodes below this level and slot to the beginning
824 node->Index(slot)->LogicalAddress(), physicalBlock);
831 slot = 0;