diff options
author | Yevgeny Popovych <yevgenyp@pointgrab.com> | 2018-06-11 14:14:33 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-06-18 14:43:12 -0400 |
commit | d146a7b9c6200c7a84a15208f0c06e0ab60890dd (patch) | |
tree | 3aa7e880487de5353ed1e4e04e3d787971229079 /fs/btrfs/btrfs.h | |
parent | 28b538b69dd44b5f4ea595059612115069ace96b (diff) |
fs: btrfs: Do not fail when all root_backups are empty
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@pointgrab.com>
Cc: Marek Behun <marek.behun@nic.cz>
Cc: Sergey Struzh <sergeys@pointgrab.com>
Diffstat (limited to 'fs/btrfs/btrfs.h')
-rw-r--r-- | fs/btrfs/btrfs.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/btrfs.h b/fs/btrfs/btrfs.h index 27d78837c5..986d078679 100644 --- a/fs/btrfs/btrfs.h +++ b/fs/btrfs/btrfs.h @@ -13,7 +13,6 @@ struct btrfs_info { struct btrfs_super_block sb; - struct btrfs_root_backup *root_backup; struct btrfs_root tree_root; struct btrfs_root fs_root; |