James Walmsley wrote:
Also addressing the questions regarding a journaling system, we can simply have the driver create a ROS.journal file in the root dir. This file won't mean anything to other systems,
I'd prefer to see it named journal.fat .journal extension would need a LFN. Since this would be a critical file for the fs, we should stick to 8.3 (it's more compatible, allow for more robust code and keeps the gate open for also journaling implementations without long filenames). Journaled fat doesn't need to be reactos specific so a vendor neutral name like journal.fat instead of journal.ros look better.
and will simply be ignored. Causing no compatibility issues. If another system messes up the FAT table or directory structures thats not the fault of ReactOS, and would require a full chkdsk.
For example, the following correct behavior: -ReactOS create a file, allocate and use several blocks and note that at the journal before writing the directory entry. -System hangs. -ReactOS reboots, check the log and free those entries.
Can produce corruption if there's a implementation not aware of journaling in the mix: -ReactOS create a file, allocate and use several blocks and note that at the journal before writing the directory entry. -System hangs. -User reboots in FooOS -FooOS detect the partition incorrectly umounted, chkdsk it and frees those blocks. -FooOS create a new file, using those sectors. This file gets correctly commited. -System hangs again. -User reboot on ReactOS, check the log and free those entries.
Here, by relying on the journal contents, ROS has just corrupted what was a correct FS.