diff options
author | Qu Wenruo <wqu@suse.com> | 2022-10-18 09:56:38 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-10-24 15:28:29 +0200 |
commit | 3d17adea74a56a4965f7a603d8ed8c66bb9356d9 (patch) | |
tree | 422fb6b536dc882ea54c1183d86ce1d15966c91f /fs/btrfs/send.c | |
parent | 968b71583130b6104c9f33ba60446d598e327a8b (diff) |
btrfs: make thaw time super block check to also verify checksum
Previous commit a05d3c915314 ("btrfs: check superblock to ensure the fs
was not modified at thaw time") only checks the content of the super
block, but it doesn't really check if the on-disk super block has a
matching checksum.
This patch will add the checksum verification to thaw time superblock
verification.
This involves the following extra changes:
- Export btrfs_check_super_csum()
As we need to call it in super.c.
- Change the argument list of btrfs_check_super_csum()
Instead of passing a char *, directly pass struct btrfs_super_block *
pointer.
- Verify that our checksum type didn't change before checking the
checksum value, like it's done at mount time
Fixes: a05d3c915314 ("btrfs: check superblock to ensure the fs was not modified at thaw time")
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/send.c')
0 files changed, 0 insertions, 0 deletions