Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor10087311008731 How Journaling Works Anchor10185021018502In order to understand how the journaling module works, you should first understand how API-level operations relate to the underlying FAT layer operations. As seen in Figure 10 Figure 12-5, an API level operation is made of one or more top-level FAT operations which, in turn, are made of one or more low-level FAT operations. Anchor10107761010776 Image Removed

...

Image Added

Figure 12-5 Relation between API and FAT layer operations

Anchor10108641010864Take a file rename operation, for example. The API-level rename operation involves one top-level FAT rename operation and the following low-level FAT sub-operations:

...

Anchor10092671009267Without journaling, a failure occurring during the rename operation can leave the file system in any of the following corrupted states:

...

10087331008733Using the journaling module, any of the previous corrupted states would be either rolled back or completed upon volume remounting. This is made possible because, prior to performing any low-level FAT operation, the journaling system logs recovery information in a special file called the journal file. By reverting or completing successive underlying low-level FAT operations, the journaling module also allows top-level FAT operations to be reverted or completed, thus making them atomic (see section 1012-6 “Optional Journaling System” on page 127). In our previous example, the journaled rename operation could only have on of the two following outcomes:

...