Lines Matching refs:transaction

249 CachedNode::UnsetUnchanged(Transaction& transaction)
257 block_cache_set_dirty(cache, fBlockNumber, false, transaction.ID());
333 CachedNode::SetToWritable(Transaction& transaction, off_t offset, bool check)
350 if (InternalSetTo(&transaction, offset) != NULL && check) {
364 CachedNode::MakeWritable(Transaction& transaction)
369 if (block_cache_make_writable(transaction.GetVolume()->BlockCache(),
370 fBlockNumber, transaction.ID()) == B_OK) {
396 CachedNode::SetToWritableHeader(Transaction& transaction)
405 InternalSetTo(&transaction, 0LL);
408 transaction.AddListener(fTree);
411 if (!transaction.GetVolume()->IsInitializing()) {
412 acquire_vnode(transaction.GetVolume()->FSVolume(),
423 CachedNode::InternalSetTo(Transaction* transaction, off_t offset)
444 if (transaction != NULL) {
446 fBlockNumber, transaction->ID());
481 CachedNode::Free(Transaction& transaction, off_t offset)
492 bplustree_header* header = cached.SetToWritableHeader(transaction);
503 status_t status = fTree->fStream->SetFileSize(transaction, lastOffset);
522 CachedNode::Allocate(Transaction& transaction, bplustree_node** _node,
534 if (SetToWritable(transaction, fTree->fHeader.FreeNode(), false) != NULL) {
536 header = cached.SetToWritableHeader(transaction);
551 if ((status = stream->Append(transaction, fTree->fNodeSize)) != B_OK)
555 header = cached.SetToWritableHeader(transaction);
568 if (SetToWritable(transaction, offset, false) == NULL)
582 BPlusTree::BPlusTree(Transaction& transaction, Inode* stream, int32 nodeSize)
588 SetTo(transaction, stream);
643 BPlusTree::SetTo(Transaction& transaction, Inode* stream, int32 nodeSize)
650 bplustree_header* header = cached.SetToWritableHeader(transaction);
653 fStatus = stream->SetFileSize(transaction, nodeSize * 2);
657 header = cached.SetToWritableHeader(transaction);
680 cached.SetToWritable(transaction, fHeader.RootNode(), false);
713 // we can't change the header since we don't have a transaction
842 Transaction transaction(fStream->GetVolume(), fStream->BlockNumber());
846 bplustree_header* header = cached.SetToWritableHeader(transaction);
859 bplustree_node* node = cached.SetToWritable(transaction, NodeSize(), false);
871 bplustree_node* node = cached.SetToWritable(transaction, offset, false);
883 // It's not important to write it out in a single transaction; just
886 transaction.Done();
887 transaction.Start(fStream->GetVolume(), fStream->BlockNumber());
891 return transaction.Done();
1156 BPlusTree::_FindFreeDuplicateFragment(Transaction& transaction,
1183 *_fragment = cached.MakeWritable(transaction);
1198 BPlusTree::_InsertDuplicate(Transaction& transaction, CachedNode& cached,
1214 transaction, bplustree_node::FragmentOffset(oldValue), false);
1250 cachedDuplicate.UnsetUnchanged(transaction);
1255 status = cachedDuplicate.Allocate(transaction,
1272 if (cached.MakeWritable(transaction) == NULL)
1308 = cachedDuplicate.MakeWritable(transaction);
1319 status = cachedDuplicate.Allocate(transaction, &newDuplicate,
1340 if (_FindFreeDuplicateFragment(transaction, node, cachedDuplicate,
1343 status = cachedDuplicate.Allocate(transaction, &fragment, &offset);
1354 if (cached.MakeWritable(transaction) == NULL)
1674 all be part of the \a transaction.
1678 BPlusTree::Insert(Transaction& transaction, const uint8* key, uint16 keyLength,
1715 status = _InsertDuplicate(transaction, cached, node,
1726 bplustree_node* writableNode = cached.MakeWritable(transaction);
1750 status_t status = cachedNewRoot.Allocate(transaction, &root,
1766 status_t status = cachedOther.Allocate(transaction, &other,
1769 cachedNewRoot.Free(transaction, newRoot);
1777 cachedOther.Free(transaction, otherOffset);
1778 cachedNewRoot.Free(transaction, newRoot);
1791 if ((other = cachedOther.SetToWritable(transaction,
1807 = cached.SetToWritableHeader(transaction);
1828 BPlusTree::_RemoveDuplicate(Transaction& transaction,
1837 bplustree_node* duplicate = cachedDuplicate.SetToWritable(transaction,
1865 if (cached.MakeWritable(transaction) == NULL)
1873 status_t status = cachedDuplicate.Free(transaction,
1914 cachedDuplicate.UnsetUnchanged(transaction);
1915 duplicate = cachedDuplicate.SetToWritable(transaction, duplicateOffset,
1936 if (cached.MakeWritable(transaction) == NULL)
1952 status_t status = cachedDuplicate.Free(transaction,
1958 && (duplicate = cachedDuplicate.SetToWritable(transaction, left,
1974 && (duplicate = cachedDuplicate.SetToWritable(transaction,
2000 if (_FindFreeDuplicateFragment(transaction, node, cachedOther,
2007 cachedDuplicate.Free(transaction, duplicateOffset);
2017 if (cached.MakeWritable(transaction) == NULL)
2098 BPlusTree::Remove(Transaction& transaction, const uint8* key, uint16 keyLength,
2131 return _RemoveDuplicate(transaction, node, cached,
2153 bplustree_node* writableNode = cached.MakeWritable(transaction);
2173 = cached.SetToWritableHeader(transaction);
2195 bplustree_node* other = otherCached.SetToWritable(transaction,
2200 if ((other = otherCached.SetToWritable(transaction, node->RightLink()))
2205 cached.Free(transaction, nodeAndKey.nodeOffset);
2221 BPlusTree::Replace(Transaction& transaction, const uint8* key, uint16 keyLength,
2246 bplustree_node* writableNode = cached.MakeWritable(transaction);