fsckis to preserve consistency. If we play back the journal to the last consistency watermark (and discard changes after the last watermark), the result is consistent, by definition. This is the same as running an
The key to this, however, is that the transaction queue is relocatable. Thus it is possible to defragment the journal entries by removing transactions that have been overwritten. This is a matter of starting at the beginning of the queue and copying the queue onto itself, overwriting entries that have been overwritten and are of a specific age. For example, suppose that we have a transaction queue
A1 B1 C1 A2 D1 A3 C2 E1where A, B, C, D, E represent the addresses of physical blocks and the subscript indicates the version of a block. Clearly, at the present time, this transaction queue is equivalent to
B1 D1 A3 C2 E1because the earlier versions A1, A2, C1 no longer matter.
This was not covered in lecture due to shortage of time. Sorry.