Opinions on error recovery?
H. Peter Anvin
Tue, 18 Dec 2001 17:57:18 -0800
Christopher Quinn wrote:
> In writing my own persistent store stuff I took the view that if there
> was any
> chance of user intervention being viable then provide a handling hook.
> Returning from the function is interpreted as continue as normal (unbounded
> computation case), and up to the function whether to launch a thread
> or simply block ie. a) display a window message and block further
> processing by not
> returning immediately, or b) launch thread to display message, while
> from handler.
> Perhaps I could solicit opinion on something?
> I see that by using a file based log, as does lpsm, it is trivial to
> detect its end.
> But what if you were to use a block device?
> Then it is not so simple because there is the matter of previously
> written log material
> being wrongly interpreted as part of a valid log record.
> I use a double root block scheme which reserves space at the head of the
> log device.
> But I am not happy with it since it entails a change of disk head
> position after the
> regular log record write. The alternative I guess is to include some
> sort of checksum
> with the last record written so as to provide a measure of protection
> inadvertent collision with previous logging. But what is a
> computationally inexpensive
> operation and what degree of certainty is enough!?
> Have you thought about this issue at all?
Well, you need to do a synchronous operation when you update the commit
record anyway, so you could at least theoretically have a dedicated end