Whamcloud - gitweb
LU-10906 checksum: enable/disable checksum correctly
There are three ways to set checksum support in Lustre. Their
order during client mount is:
- 1. configure --enable/disable-checksum, this(ENABLE_CHECKSUM)
only affects the default mount option and is set in function
client_obd_setup().
- 2. lctl set_param -P osc.*.checksums=0/1, when processing llog,
this value will be set by osc_checksum_seq_write().
- 3. mount option checksum/nochecksum, this will be checked in
ll_options() and be set in client_common_fill_super()->
obd_set_info_async().
This patch fixes one issue in 3. That is if mount option
"-o checksum/nochecksum" is specified, checksum will be changed
accordingly, no matter what is set by "set_param -P" or the
default option; and if no mount option is specified, the value
set by "set_param -P" will be kept. Also, test_77k is added to
sanity.sh to verify this patch.
What's more, a minor initialization issue of cl_supp_cksum_types
is fixed. cl_supp_cksum_types should be always initialized no
matter checksum is enabled or not.
Change-Id: I95d73122d800f5cd44b5fabb0cf00b5be0a35443
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/32095
Reviewed-by: Yingjin Qian <qian@ddn.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>