diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-12-15 09:14:36 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2016-01-19 18:21:41 -0800 |
commit | 319e4d0661e5323c9f9945f0f8fb5905e5fe74c3 (patch) | |
tree | 8930cb9cd248db15d0443bc93e046be23633921c /fs/dlm/dlm_internal.h | |
parent | c2d6cb1636d235257086f939a8194ef0bf93af6e (diff) | |
download | op-kernel-dev-319e4d0661e5323c9f9945f0f8fb5905e5fe74c3.zip op-kernel-dev-319e4d0661e5323c9f9945f0f8fb5905e5fe74c3.tar.gz |
btrfs: Enhance super validation check
Enhance btrfs_check_super_valid() function by the following points:
1) Restrict sector/node size check
Not the old max/min valid check, but also check if it's a power of 2.
So some bogus number like 12K node size won't pass now.
2) Super flag check
For now, there is still some inconsistency between kernel and
btrfs-progs super flags.
And considering btrfs-progs may add new flags for super block, this
check will only output warning.
3) Better root alignment check
Now root bytenr is checked against sector size.
4) Move some check into btrfs_check_super_valid().
Like node size vs leaf size check, and PAGESIZE vs sectorsize check.
And magic number check.
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
0 files changed, 0 insertions, 0 deletions