[MacLoggerContest] Any other topics?

Jack Brindle jackbrindle at earthlink.net
Wed Mar 2 01:44:07 EST 2005


On Feb 28, 2005, at 1:56 PM, John Bastin wrote:

> Automatic journaling, so even if you have a power failure, NOTHING is  
> lost.

This grabbed my attention - I'd like to drill into it a bit to  
understand exactly what is being asked for and why. More importantly, I  
want to understand the current need for journalling, because I don't  
think I understand it properly now.

Under MacOS X information written to files may be immediately flushed  
to disk. When writing a log file, the data may be appended to the log  
file and saved to disk immediately. As I understand journalling, the  
information is written to the journal file, then to the log file. In  
this case a power failure before the journal write would lose the  
entry, while one in-between the two writes will simply cause a  
journal-to-log file update on restart. But, the information that would  
be appended to the log file could have been handled in place of the  
journal write, taking care of the whole thing at once. In both cases,  
power failures before the first write completes causes the entire entry  
to be lost, while a failure after the first write completes just causes  
the operator to be rather unhappy.

It seems that the simplest way to handle things would be to write the  
log entry to the file and immediately flush the file to disk. Is this  
too simple? What am I missing?

- Jack Brindle, W6FB
------------------------------------------------------------------------ 
---------------------



More information about the MacLoggerContest mailing list