• L
    jbd2: fix invalid descriptor block checksum · 585adb5d
    luojiajun 提交于
    euler inclusion
    category: bugfix
    bugzilla: NA
    CVE: NA
    
    -------------------------------------------------
    
    In jbd2_journal_commit_transaction(), if we are in abort mode,
    we may flush the buffer without setting descriptor block checksum
    by goto start_journal_io. Then fs is mounted,
    jbd2_descriptor_block_csum_verify() failed.
    
    [  271.379811] EXT4-fs (vdd): shut down requested (2)
    [  271.381827] Aborting journal on device vdd-8.
    [  271.597136] JBD2: Invalid checksum recovering block 22199 in log
    [  271.598023] JBD2: recovery failed
    [  271.598484] EXT4-fs (vdd): error loading journal
    
    Fix this problem by keep setting descriptor block checksum if the
    descriptor buffer is not NULL.
    
    This checksum problem can be reproduced by xfstests generic/388.
    
    v1->v2:
    checkpatch fix
    Signed-off-by: Nluojiajun <luojiajun3@huawei.com>
    Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    585adb5d
commit.c 33.6 KB