David Sterba wrote on 2015/12/14 17:24 +0100:
On Tue, Dec 08, 2015 at 03:35:57PM +0800, Qu Wenruo wrote:
@@ -4005,31 +3989,47 @@ static int btrfs_check_super_valid(struct btrfs_fs_info
*fs_info,
}
/*
-* The common minimum, we don't know if we can trust the
On Tue, Dec 08, 2015 at 03:35:57PM +0800, Qu Wenruo wrote:
> @@ -4005,31 +3989,47 @@ static int btrfs_check_super_valid(struct
> btrfs_fs_info *fs_info,
> }
>
> /*
> - * The common minimum, we don't know if we can trust the
> nodesize/sectorsize
> - * items yet, they'll
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