• Daeho Jeong's avatar
    ext4, jbd2: add REQ_FUA flag when recording an error in the superblock · 564bc402
    Daeho Jeong authored
    When an error condition is detected, an error status should be recorded into
    superblocks of EXT4 or JBD2. However, the write request is submitted now
    without REQ_FUA flag, even in "barrier=1" mode, which is followed by
    panic() function in "errors=panic" mode. On mobile devices which make
    whole system reset as soon as kernel panic occurs, this write request
    containing an error flag will disappear just from storage cache without
    written to the physical cells. Therefore, when next start, even forever,
    the error flag cannot be shown in both superblocks, and e2fsck cannot fix
    the filesystem problems automatically, unless e2fsck is executed in
    force checking mode.
    
    [ Changed use test_opt(sb, BARRIER) of checking the journal flags -- TYT ]
    Signed-off-by: default avatarDaeho Jeong <daeho.jeong@samsung.com>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    564bc402
journal.c 74 KB