Whamcloud - gitweb
LU-14895 osd-ldiskfs: combine checksum functions 56/44656/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Aug 2021 09:42:37 +0000 (03:42 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 22 Sep 2021 04:43:52 +0000 (04:43 +0000)
Reduce code duplication for nearly-identical checksum calculations.
The osd_dif_type1_generate() and osd_dif_type3_generate() were nearly
the same, as were osd_dif_type1_verify() and osd_dif_type3_verify().
Combine these functions to share the code, and handle the difference
between T10-PI type 1 and type 3 with an argument.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I40afb15fd80577ef6de918c90e4111e775ce7057
Reviewed-on: https://review.whamcloud.com/44656
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

No differences found