Whamcloud - gitweb
LU-14895 osd-ldiskfs: combine checksum functions
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Aug 2021 09:42:37 +0000 (03:42 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 14 Jan 2022 07:11:14 +0000 (07:11 +0000)
commit04e5db25eb11848bb8cf95df64fac407dd59ab3f
tree478bedbfa73fb3ae382f034fc392f849582b5dcf
parentb6199533100eca610214910c59c35650c51db5a5
LU-14895 osd-ldiskfs: combine checksum functions

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.

Lustre-change: https://review.whamcloud.com/44656
Lustre-commit: 7fdd664b3518e5e8d8a243898d48d9c62c22e18a

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I40afb15fd80577ef6de918c90e4111e775ce7057
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45828
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osd-ldiskfs/osd_integrity.c
lustre/osd-ldiskfs/osd_internal.h