2.3.3 Transaction Log
To ensure integrity of the files, each write to a file is structured as a transaction.
A transaction consists of the following types of data:
New file node lists can be added by the transaction. FileNode structures in existing file node lists MUST NOT be modified or removed. New FileNode structures can be added to existing file node lists.
A set of TransactionEntry structures (section 220.127.116.11) that specify which file node lists are added or modified by this transaction and the new number of FileNode structures in those file node lists.
The TransactionEntry structures for all transactions are stored sequentially in TransactionLogFragment.sizeTable. The last entry for a transaction MUST be a special sentinel entry with the value of the TransactionEntry.srcID field set to 0x00000001.
A Header.cTransactionsInLog field (section 2.3.1) that maintains the total number of transactions that have occurred. The transaction’s number is defined by the order of the transaction in the transaction log.
A transaction is committed only after the Header.cTransactionsInLog field is updated to match the number of the transaction. All TransactionEntry structures for transactions with higher numbers and FileNode structures added by them MUST be ignored.