As described earlier in the chapter, a
Transaction Support
By leveraging the Kernel Transaction Manager (KTM) support in the kernel, as well as the facilities provided by the Common Log File System that were described earlier, NTFS implements a transactional model called
Note
Support for TxF was added to the NTFS driver without actually changing the format of the NTFS data structures, which is why the NTFS format version number, 3.1, is the same as it has been since Windows XP and Windows Server 2003. TxF achieves backward compatibility by reusing the attribute type ($LOGGED_UTILITY_STREAM) that was previously used only for EFS support instead of adding a new one.
The overall architecture for TxF, shown in Figure 12-49, uses several components:
A library for reading TxF logs (%SystemRoot%\System32\Txfw32.dll)
A COM component for TxF logging functionality (%SystemRoot\System32\Txflog.dll)
The transactional NTFS library inside the NTFS driver
The CLFS infrastructure for reading and writing log records
Isolation
Although transactional file operations are opt-in, just like the transactional registry (TxR) operations described in Chapter 4 in Part 1, TxF has an impact on regular applications that are not transaction-aware because it ensures that the transactional operations are
Read-committed isolation involves the concept of
Nontransacted writers, on the other hand, are prevented from opening the file by both transacted writers and transacted readers, so they cannot make changes to the file without being part of the transaction. Nontransacted readers act similarly to transacted readers in that they see only the file contents that were last committed when the file handle was open. Unlike transacted readers, however, they do not receive read-committed isolation, and as such they always receive the updated view of the latest committed version of a transacted file without having to open a new file handle. This allows non-transaction-aware applications to behave as expected.
To summarize, TxF’s read-committed isolation model has the following characteristics:
Changes are isolated from transacted readers
Changes are rolled back (undone) if the associated transaction is rolled back, if the machine crashes, or if the volume is forcibly dismounted.
Changes are flushed to disk if the associated transaction is committed.
EXPERIMENT: Understanding and Managing Transactions