Re: Checksumming blocks? [was Re: the " 'official' point of view" expressed by kernelnewbies.org regarding reiser4 inclusion]
From: Matthias Andree
Date: Thu Aug 03 2006 - 19:33:01 EST
(I've stripped the Cc: list down to the bones.
No need to shout side topics from the rooftops.)
On Thu, 03 Aug 2006, Russell Leighton wrote:
> If the software (filesystem like ZFS or database like Berkeley DB)
> finds a mismatch for a checksum on a block read, then what?
(Note that this assumes a Berkeley DB in transactional mode.) Complain,
demand recovery, set the panic flag (refusing further transactions
except close and open for recovery).
> Is there a recovery mechanism, or do you just be happy you know there is
> a problem (and go to backup)?
Recoverability depends on log retention policy (set by the user or
administrator) and how recently the block was written. There is a
For applications that don't need their own recovery methods (few do),
db_recover can do the job.
In typical cases of power loss or kernel panic during write, the broken
page will probably either be in the log so it can be restored (recover
towards commit), or, if the commit hadn't completed but pages had been
written due to cache conflicts, the database will be rolled back to the
state before the interrupted transaction, effectively aborting the
The details are in the Berkeley DB documentation, which please see.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/