Whamcloud - gitweb
LU-10472 osd-ldiskfs: add T10PI support for BIO 92/30792/7
authorLi Xi <lixi@ddn.com>
Mon, 8 Jan 2018 01:09:46 +0000 (10:09 +0900)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 17 May 2018 02:07:45 +0000 (02:07 +0000)
commitbe30c0d71e75d3e24674edcc7e02d005d2a9f5c2
treed703b88b563c5d091c8102fea5318f58a4b82ed5
parent2d3ef2e56ed20d07167b4ba2e3b9f4e534b6a7df
LU-10472 osd-ldiskfs: add T10PI support for BIO

This patch enables data integrity check in osd-ldiskfs when submiting
bio.

A fault injection mechanism is added to make sure the data integrity
check works well. On a OST with T10PI feature enabled, following
results are expected:

$ lctl set_param fail_loc=0x243
fail_loc=0x243
$ dd if=/dev/zero of=/mnt/lustre/file bs=1048576 count=100
dd: error writing '/mnt/lustre/file': Invalid or incomplete
multibyte or wide character
34+0 records in
33+0 records out
34603008 bytes (35 MB) copied, 0.510675 s, 67.8 MB/s

When doing fault injection, the write operation will wait until the
value is returned from BIO. Otherwise, returned error number may not
be returned to the application.

This implies a problem: because of the async submit of BIO, even the
OST has T10PI enabled, the application might not be able get error
notification when data corruption happens. However, there is nothing
we can do to improve this (unless write performance is not important),
because async commit is essential for good performance.

Change-Id: I76cc14b42feed835158100d35f65aedae0d79a5c
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/30792
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
lustre/include/obd_support.h
lustre/osd-ldiskfs/osd_io.c