consider_older_slot

Function consider_older_slot 

Source
pub fn consider_older_slot(
    current: &mut Option<(u32, u32)>,
    address: u32,
    bytes: &[u8; 2048],
    newer_than: u32,
)
Expand description

Consider one journal slot while looking for the newest committed record strictly older than newer_than.

This is how a boot walks back after the layer above rejects a record’s payload. consider_slot recovers from a corrupt or uncommitted record, but a record whose CRC is fine and whose contents the session refuses would otherwise take the device to a bare boot while a readable older generation sits in the journal.

Re-scanning rather than retaining a runner-up during the first mount keeps that path’s “never buffers a second copy” discipline intact; the cost is paid only on a boot that is already going wrong.