• G
    ext4: Add the journal checksum feature · 818d276c
    Girish Shilamkar 提交于
    The journal checksum feature adds two new flags i.e
    JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT and JBD2_FEATURE_COMPAT_CHECKSUM.
    
    JBD2_FEATURE_CHECKSUM flag indicates that the commit block contains the
    checksum for the blocks described by the descriptor blocks.
    Due to checksums, writing of the commit record no longer needs to be
    synchronous. Now commit record can be sent to disk without waiting for
    descriptor blocks to be written to disk. This behavior is controlled
    using JBD2_FEATURE_ASYNC_COMMIT flag. Older kernels/e2fsck should not be
    able to recover the journal with _ASYNC_COMMIT hence it is made
    incompat.
    The commit header has been extended to hold the checksum along with the
    type of the checksum.
    
    For recovery in pass scan checksums are verified to ensure the sanity
    and completeness(in case of _ASYNC_COMMIT) of every transaction.
    Signed-off-by: NAndreas Dilger <adilger@clusterfs.com>
    Signed-off-by: NGirish Shilamkar <girish@clusterfs.com>
    Signed-off-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
    Signed-off-by: NMingming Cao <cmm@us.ibm.com>
    818d276c
commit.c 31.3 KB