[LU-10906] checksums parameter not persistent after reboot Created: 11/Apr/18 Updated: 07/Jan/19 Resolved: 06/Oct/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.10.0 |
| Fix Version/s: | Lustre 2.12.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Emoly Liu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Severity: | 3 | ||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||
| Description |
|
Attempting to run mgs$ lctl set_param -P osc.s1lcl*.checksums=0 to disable checksums for their clients does not return any errors, and a mgs$ lctl get_param osc.s1lcl*.checksums shows that it is properly set to 0 at that time. However, after a reboot of a client node, this parameter gets reset to 1. This behavior does not appear for any of the other parameters that they are setting - just the checksums. There is something preventing the checksums parameter from being set permanently. |
| Comments |
| Comment by Andreas Dilger [ 11/Apr/18 ] |
|
It isn't clear why the lctl set_param -P setting is not persistent for this parameter. It might be caused by ordering issues during client mount, since there is a separate "-o checksum" and "-o nochecksum" mount option available (which is enabled by default) that is also trying to enable the checksum during mount. Mounting the clients with "-o nochecksum" is verified to be working as expected (lctl get_param osc.*.checksums returns 0 in this case, and returns 1 without this parameter). Some notes:
|
| Comment by Emoly Liu [ 19/Apr/18 ] |
|
As Andreas said, after a remount, this parameter is really set to 0 by "process_param2_config()) lctl: invoked upcall /usr/sbin/lctl set_param osc.lustre*.checksums=0", but it is changed later by client_common_fill_super()
->obd_set_info_async()
->lov_set_info_async()
->osc_set_info_async()
int osc_set_info_async()
{
...
if (KEY_IS(KEY_CHECKSUM)) {
if (vallen != sizeof(int))
RETURN(-EINVAL);
exp->exp_obd->u.cli.cl_checksum = (*(int *)val) ? 1 : 0;
RETURN(0);
}
...
}
|
| Comment by Emoly Liu [ 20/Apr/18 ] |
|
There are three ways to set checksum support in Lustre:
My question is if "--disable-checksum" is specified when configuring, can we enable checksum again with "-o checksum" or osc.*.checksums=1? I think no. |
| Comment by Andreas Dilger [ 20/Apr/18 ] |
|
It looks like "configure --enable-checksum" (ENABLE_CHECKSUM) only affects the default mount option in client_obd_setup() and ll_sbi_init(), but doesn't actually disable any of the code. That means it should be possible to enable checksums even if --disable-checksum is used. There does look like one minor bug in client_obd_setup() - the initialization of cl_supp_cksum_types is not done if ENABLE_CHECKSUM is unset, but it should probably always do that. I think the call to obd_set_info_async() could be removed if the current setting matches the ENABLE_CHECKSUM definition and there isn't a checksum or nochecksum mount option. Maybe something like the following, to only change the OSC checksum values if it has been changed from the default value: checksum = sbi->ll_flags & LL_SBI_CHECKSUM;
#ifdef ENABLE_CHECKSUM
default_checksum = LL_SBI_CHECKSUM;
#endif
if (checksum ^ default_checksum) {
err = obd_set_info_async(NULL, sbi->ll_dt_exp,
sizeof(KEY_CHECKSUM), KEY_CHECKSUM,
sizeof(checksum), &checksum, NULL);
if (err) {
CERROR("%s: Set checksum failed: rc = %d\n",
sbi->ll_dt_exp->exp_obd->obd_name, err);
GOTO(out_root, err);
}
}
|
| Comment by Emoly Liu [ 20/Apr/18 ] |
|
Got, thanks! |
| Comment by Gerrit Updater [ 20/Apr/18 ] |
|
Emoly Liu (emoly.liu@intel.com) uploaded a new patch: https://review.whamcloud.com/32095 |
| Comment by Gerrit Updater [ 24/Apr/18 ] |
|
Emoly Liu (emoly.liu@intel.com) uploaded a new patch: https://review.whamcloud.com/32131 |
| Comment by Gerrit Updater [ 21/May/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/32095/ |
| Comment by Gerrit Updater [ 22/Sep/18 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/33222 |
| Comment by Gerrit Updater [ 05/Oct/18 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33222/ |
| Comment by Peter Jones [ 06/Oct/18 ] |
|
Landed for 2.12 |