On Wed, May 22, 2019 at 11:33:39AM +0300, Nikolay Borisov wrote: > > > @@ -1799,16 +1801,22 @@ static int scrub_checksum_data(struct scrub_block > > *sblock) > > if (!sblock->pagev[0]->have_csum) > > return 0; > > > > + shash->tfm = fs_info->csum_shash; > > + shash->flags = 0; > > + > > + crypto_shash_init(shash); > > + > > on_disk_csum = sblock->pagev[0]->csum; > > page = sblock->pagev[0]->page; > > buffer = kmap_atomic(page); > > > > + memset(csum, 0xff, btrfs_super_csum_size(sctx->fs_info->super_copy)); > > Is this required? You don't do it in other place like > scrub_checksum_tree_block/scrub_checksum_super/__readpage_endio_check. > If it's not strictly require just drop it.
I guess this is a leftover, thanks for spotting it. -- Johannes Thumshirn SUSE Labs Filesystems jthumsh...@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850