Whamcloud - gitweb
LU-14924 osd-ldiskfs: fix T10PI verify/generate_fn 48/44548/4
authorLi Dongyang <dongyangli@ddn.com>
Tue, 10 Aug 2021 13:20:13 +0000 (23:20 +1000)
committerOleg Drokin <green@whamcloud.com>
Wed, 25 Aug 2021 06:23:17 +0000 (06:23 +0000)
commit92fc8708a2d5b20e317a2cec97056c752a8b7bd4
tree51e530f0fe2de32df79a5ef2afed9b4a21204fd2
parente7897043c6eff00593123f2b43075bebeb50934f
LU-14924 osd-ldiskfs: fix T10PI verify/generate_fn

We are making wrong assumptions in the verify/generate_fn
of T10PI.

Consider this case: we have 4 pages lnb[0-3] in osd_iobuf.
lnb[2] is mapped to a hole, so it won't be added to bio.
If lnb[3] happens to be contiguous after lnb[1], lnb[3] will
be added to bio, with a bi_idx of 2.
In the verify/generate_fn, we work out which niobuf_local
to feed the guard tags to using bi_idx and obp_start_page_idx
and we will end up with wrong niobuf and set the guard tags
for lnb[2].

Contiguous blocks in bio doesn't necessarily mean we are looking
at contiguous niobuf_local/lnb in osd_iobuf->dr_lnbs

Test-Parameters: env=ONLY=77n testlist=sanity
Change-Id: I1ea1b6498692044e680c8754cd31e2c2b7bc9539
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/44548
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_integrity.c
lustre/osd-ldiskfs/osd_io.c
lustre/tests/sanity.sh