• Qu Wenruo's avatar
    btrfs: Refactor btrfs_check_super_valid · 069ec957
    Qu Wenruo authored
    Refactor btrfs_check_super_valid:
    
    1) Rename it to btrfs_validate_mount_super()
       Now it's more obvious when the function should be called.
    
    2) Extract core check routine into validate_super()
       Later write time check can reuse it, and if needed, we could also
       use validate_super() to check each super block.
    
    3) Add more comments about btrfs_validate_mount_super()
       Mostly about what it doesn't check and when it should be called.
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    [ rename to validate_super ]
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    069ec957
disk-io.c 124 KB