[U-Boot] fs: btrfs: Do not fail when all root_backups are empty

Tom Rini trini at konsulko.com
Tue Jun 19 18:41:56 UTC 2018


On Mon, Jun 11, 2018 at 02:14:33PM +0300, Yevgeny Popovych wrote:

> This is the case when reading freshly created filesystem.
> The error message is like the following:
>     btrfs_read_superblock: No valid root_backup found!
> 
> Since the data from super_roots/root_backups is not actually used -
> decided to rework btrfs_newest_root_backup() into
> btrfs_check_super_roots() that will only check if super_roots
> array is valid and correctly handle empty scenario.
> 
> As a result:
> * btrfs_read_superblock() now only checks if super_roots array is valid;
>   the case when it is empty is considered OK.
> * removed root_backup pointer from btrfs_info,
>   which would be NULL in case of empty super_roots.
> * btrfs_read_superblock() verifies number of devices from the superblock
>   itself, not newest root_backup.
> 
> Signed-off-by: Yevgeny Popovych <yevgenyp at pointgrab.com>
> Cc: Marek Behun <marek.behun at nic.cz>
> Cc: Sergey Struzh <sergeys at pointgrab.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180619/b422cc2c/attachment.sig>


More information about the U-Boot mailing list