Whamcloud - gitweb
LU-11770 osd-ldiskfs: preserve bio_integrity API 40/33840/5
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 12 Dec 2018 23:08:18 +0000 (16:08 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 17 Dec 2018 19:35:02 +0000 (19:35 +0000)
Preserve the existing kernel API for bio_integrity when the T10-PI
patches are applied, so that any other code that may be using this
interface do not break.

In particular, keep the EXPORT_SYMBOL(bio_integrity_alloc) and
EXPORT_SYMBOL(bio_integrity_prep) in place to avoid module breakage.

In struct bio_integrity_payload put the *bip_generate_fn and
*bip_verify_fn pointers after *bip_vec, since bip_vec is the last
field directly accessed by callers.

In struct blk_integrity_exchg the bi_idx field only needs to be an
unsigned short since the bio->bi_idx and bio->bi_vcnt values used
with it are also unsigned short.  This saves 8 bytes of padding in
the struct and puts the added bi_bio field at the end to preserve
the structure field alignment for external callers.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9e29723d5d581a65b1c2ca2611d012c05b953514
Reviewed-on: https://review.whamcloud.com/33840
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

No differences found