• Brian Foster's avatar
    bcachefs: mark journal replicas before journal write submission · a7b29b8d
    Brian Foster authored
    
    
    The journal write submission path marks the associated replica
    entries for journal data in journal_write_done(), which is just
    after journal write bio submission. This creates a small window
    where journal entries might have been written out, but the
    associated replica is not marked such that recovery does not know
    that the associated device contains journal data.
    
    Move the replica marking a bit earlier in the write path such that
    recovery is guaranteed to recognize that the device contains journal
    data in the event of a crash.
    Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    a7b29b8d
journal_io.c 48 KB