On 25.07.19 г. 12:33 ч., Johannes Thumshirn wrote: > Cache the super-block's checksum type field in 'struct recover_control'. > This will be needed for further refactoring the checksum handling. > > Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> > --- Reviewed-by: Nikolay Borisov <nbori...@suse.com> > cmds/rescue-chunk-recover.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/cmds/rescue-chunk-recover.c b/cmds/rescue-chunk-recover.c > index 608af9d49407..308731ea5ea6 100644 > --- a/cmds/rescue-chunk-recover.c > +++ b/cmds/rescue-chunk-recover.c > @@ -47,6 +47,7 @@ struct recover_control { > int yes; > > u16 csum_size; > + u16 csum_type; > u32 sectorsize; > u32 nodesize; > u64 generation; > @@ -1530,6 +1531,7 @@ static int recover_prepare(struct recover_control *rc, > const char *path) > rc->generation = btrfs_super_generation(sb); > rc->chunk_root_generation = btrfs_super_chunk_root_generation(sb); > rc->csum_size = btrfs_super_csum_size(sb); > + rc->csum_type = btrfs_super_csum_type(sb); > > /* if seed, the result of scanning below will be partial */ > if (btrfs_super_flags(sb) & BTRFS_SUPER_FLAG_SEEDING) { >
- [RFC PATCH 11/17] btrfs-progs: don't assume checksums a... Johannes Thumshirn
- [RFC PATCH 14/17] btrfs-progs: simplify update_block_cs... Johannes Thumshirn
- Re: [RFC PATCH 14/17] btrfs-progs: simplify update... Nikolay Borisov
- [RFC PATCH 4/4] btrfs: sysfs: export supported checksum... Johannes Thumshirn
- Re: [RFC PATCH 4/4] btrfs: sysfs: export supported... David Sterba
- Re: [RFC PATCH 4/4] btrfs: sysfs: export suppo... Johannes Thumshirn
- Re: [RFC PATCH 4/4] btrfs: sysfs: export suppo... Johannes Thumshirn
- Re: [RFC PATCH 4/4] btrfs: sysfs: export supported... Nikolay Borisov
- [RFC PATCH 08/17] btrfs-progs: cache csum_type in recov... Johannes Thumshirn
- Re: [RFC PATCH 08/17] btrfs-progs: cache csum_type... Nikolay Borisov
- [RFC PATCH 09/17] progs: pass in a btrfs_mkfs_config to... Johannes Thumshirn
- Re: [RFC PATCH 09/17] progs: pass in a btrfs_mkfs_... David Sterba
- Re: [RFC PATCH 09/17] progs: pass in a btrfs_mkfs_... Nikolay Borisov
- [RFC PATCH 13/17] btrfs-progs: pass checksum type to bt... Johannes Thumshirn
- [RFC PATCH 15/17] btrfs-progs: update checksumming api Johannes Thumshirn
- [RFC PATCH 2/4] btrfs: create structure to encode check... Johannes Thumshirn
- Re: [RFC PATCH 2/4] btrfs: create structure to enc... Su Yue
- Re: [RFC PATCH 2/4] btrfs: create structure to enc... David Sterba
- Re: [RFC PATCH 2/4] btrfs: create structure to enc... Nikolay Borisov
- Re: [RFC PATCH 2/4] btrfs: create structure to... Johannes Thumshirn