• Yan Zheng's avatar
    Btrfs: avoid potential super block corruption · 2d69a0f8
    Yan Zheng authored
    The data in fs_info->super_for_commit are zeros before the
    first transaction commit. If tree log sync and system crash
    both occur before the first transaction commit, super block
    will get corrupted.
    
    This fixes it by properly filling in the super_for_commit field at
    open time.
    Signed-off-by: default avatarYan Zheng <zheng.yan@oracle.com>
    2d69a0f8
disk-io.c 63.1 KB