Lines Matching refs:transaction

117 		// do the update -- start a transaction, lock the node, and update
118 Transaction transaction(node->GetVolume());
119 status_t error = transaction.StartAndAddNode(node);
125 error = transaction.Commit(StatChangedNotification(node, statFlags));
433 Transaction transaction(volume);
454 // start the transaction
455 error = transaction.Start();
460 error = transaction.AddNodes(directory, childNode);
469 transaction.Abort();
493 error = directory->RemoveEntry(name, transaction);
509 // commit the transaction
510 return transaction.Commit(EntryRemovedNotification(directory, name,
519 open_file(Volume* volume, Node* node, int openMode, Transaction& transaction,
537 // need a write lock and a transaction.
543 status_t error = transaction.IsActive()
544 ? transaction.AddNode(node) : transaction.StartAndAddNode(node);
547 } else if (!transaction.IsNodeLocked(node))
574 error = node->Resize(0, false, transaction);
583 error = transaction.Commit(StatChangedNotification(node,
597 int openMode, int permissions, Transaction& transaction,
603 // Start the transaction and add the directory. We only need a read lock
608 if (transaction.IsActive()) {
609 directoryLocked = transaction.IsNodeLocked(directory);
611 error = transaction.AddNode(directory);
613 error = transaction.StartAndAddNode(directory);
632 // anywhere, since a transaction is already running.
634 transaction.RemoveNode(directory);
636 error = open_file(volume, childNode, openMode, transaction,
663 error = volume->CreateFile(permissions, transaction, newFile);
668 error = directory->InsertEntry(name, newFile->BlockIndex(), transaction);
674 error = open_file(volume, newFile, openMode & ~O_TRUNC, transaction,
694 transaction.UpdateNodeFlags(newFile, TRANSACTION_REMOVE_NODE_ON_ERROR);
706 transaction.UpdateNodeFlags(newFile, TRANSACTION_DELETE_NODE);
710 // commit the transaction
712 error = transaction.Commit(EntryCreatedNotification(directory, name,
729 If a transaction is given and the attribute directory doesn't exist, a new
732 responsible for putting it. If a transaction was given, the attribute
733 directory must be put after committing/aborting the transaction.
736 get_attribute_directory(Node* node, Transaction* transaction,
759 if (transaction == NULL)
764 S_IRWXU | S_IRWXG | S_IRWXO, *transaction, attributeDirectory);
779 // committing or aborting the transaction. Instead, on error remove it.
780 transaction->UpdateNodeFlags(attributeDirectory,
1181 // start a transaction and add the directory (write locks it, too)
1182 Transaction transaction(volume);
1183 error = transaction.StartAndAddNode(directory);
1193 error = volume->CreateSymLink(mode, transaction, newSymLink);
1198 error = newSymLink->WriteSymLink(path, strlen(path), transaction);
1203 error = directory->InsertEntry(name, newSymLink->BlockIndex(), transaction);
1212 // commit the transaction
1213 return transaction.Commit(EntryCreatedNotification(directory, name,
1235 // start a transaction and lock the nodes
1236 Transaction transaction(volume);
1237 status_t error = transaction.Start();
1241 error = transaction.AddNodes(directory, node);
1255 error = directory->InsertEntry(name, node->BlockIndex(), transaction);
1263 // commit the transaction
1264 return transaction.Commit(EntryCreatedNotification(directory, name, node));
1294 Transaction transaction(volume);
1315 // start the transaction
1316 error = transaction.Start();
1322 ? transaction.AddNodes(fromDirectory, toDirectory, node)
1323 : transaction.AddNodes(fromDirectory, node);
1332 transaction.Abort();
1373 error = toDirectory->InsertEntry(toName, node->BlockIndex(), transaction);
1377 error = fromDirectory->RemoveEntry(fromName, transaction);
1386 // commit the transaction
1387 return transaction.Commit(EntryMovedNotification(fromDirectory, fromName,
1439 // start a transaction and add the node to it (write locks the node, too)
1440 Transaction transaction(volume);
1441 status_t error = transaction.StartAndAddNode(node);
1456 error = node->Resize(st->st_size, true, transaction);
1528 // commit the transaction
1529 return transaction.Commit(StatChangedNotification(node, statMask));
1549 Transaction transaction(volume);
1554 transaction, true, cookie, node, created);
1576 Transaction transaction(volume);
1578 status_t error = open_file(volume, node, openMode, transaction, true,
1685 // start a transaction and attach the directory (write locks it, too)
1686 Transaction transaction(volume);
1687 error = transaction.StartAndAddNode(directory);
1697 error = volume->CreateDirectory(perms, transaction, newDirectory);
1703 transaction);
1713 // commit the transaction
1714 return transaction.Commit(EntryCreatedNotification(directory, name,
1887 // Start a transaction and lock the node.
1890 Transaction transaction(volume);
1891 status_t error = transaction.StartAndAddNode(node);
1902 error = get_attribute_directory(node, &transaction, attributeDirectory);
1910 S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, transaction,
1920 // commit the transaction
1921 if (transaction.IsActive()) {
1928 error = transaction.Commit(&attributeNotification,
1931 error = transaction.Commit();
1956 // given, we already start the transaction and write-lock the node, so we
1959 Transaction transaction(volume);
1962 status_t error = transaction.StartAndAddNode(node);
1987 error = open_file(volume, cookie->attribute, openMode, transaction, false,
1992 // commit the transaction
1993 if (transaction.IsActive()) {
2000 error = transaction.Commit(&attributeNotification,
2003 error = transaction.Commit();
2079 Transaction transaction(volume);
2080 if (transaction.StartAndAddNode(node) != B_OK)
2082 if (transaction.AddNode(cookie->attribute) != B_OK)
2087 // commit the transaction
2094 transaction.Commit(&attributeNotification, &statNotification);
2097 transaction.Commit();
2127 // start a transaction
2128 Transaction transaction(volume);
2129 status_t error = transaction.StartAndAddNode(node);
2145 error = transaction.AddNode(attributeDirectory);
2162 error = transaction.AddNode(attribute);
2170 error = attributeDirectory->RemoveEntry(name, transaction, &attrDirEmpty);
2178 transaction.UpdateNodeFlags(attribute, TRANSACTION_UNREMOVE_NODE_ON_ERROR);
2185 transaction.UpdateNodeFlags(attributeDirectory,
2196 // commit the transaction
2200 return transaction.Commit(&attributeNotification, &statNotification);