Whamcloud - gitweb
LU-11011 osc: add preferred checksum type support 49/32349/11
authorLi Xi <lixi@ddn.com>
Thu, 10 May 2018 04:25:05 +0000 (00:25 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Aug 2019 05:04:07 +0000 (05:04 +0000)
commit9b6b5e4798281eceb45699431bc871eda6d968c4
treed43ea45db34c6445aee90ea7eeb17218c33c6b1b
parentb09e63db24e5770b0a53ac6d68f91f08dc368be4
LU-11011 osc: add preferred checksum type support

Some checksum types might not work correctly even though they are
available options and have the best speeds during test. In these
circumstances, users might want to use a certain checksum type which
is known to be functional. However, "lctl conf_param XXX-YYY.osc.
checksum_type=ZZZ" won't help to enforce a certain checksum type,
because the selected checksum type is determined during OSC
connection, which will overwrite the LLOG parameter.

To solve this problem, whenever a valid checksum type is set by "lctl
conf_param" or "lctl set_param", it is remembered as the perferred
checksum type for the OSC. During connection process, if that
checksum type is available, that checksum type will be selected as
the RPC checksum type regardless of its speed.

The semantics of interface /proc/fs/lustre/osc/*/checksum_type is
changed for a little bit. If a wrong checksum name is being written
into this entry, -EINVAL will be returned as before. If the written
string is a valid checksum name, even though the checksum type is
not supported by this OSC/OST pair, the checksum type will still be
remembered as the perferred checksum type, and return value will be
-ENOTSUPP. Whenever connecting/reconnecting happens, if perferred
checksum type is availabe, it will be used for the RPC checksum.

Change-Id: Ie6fdc1d8ed6c55531ad6b7c926659d644fefccaf
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/32349
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd.h
lustre/include/obd_cksum.h
lustre/ldlm/ldlm_lib.c
lustre/osc/lproc_osc.c
lustre/ptlrpc/import.c
lustre/tests/sanity.sh