Whamcloud - gitweb
LU-12967 ofd: restore sync_on_lock_cancel tunable 37/37037/2
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Nov 2019 00:56:35 +0000 (17:56 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 3 Jan 2020 23:42:16 +0000 (23:42 +0000)
commitcdffffb73080ad1100549afbcdbb09d3ee7a1c50
tree520f0e5c59413dd8f7c67f5bae9f61191ae9f690
parent5519429c5c4cee15d43c7483f29318899e3cf95e
LU-12967 ofd: restore sync_on_lock_cancel tunable

The "ofd.*.sync_on_lock_cancel" tunable was inadvertently replaced
during procfs->sysfs changes in 2.12 with "sync_lock_cancel".  Restore
the "sync_on_lock_cancel" tunable since it has existed since the 2.0
release and is definitely in use with several systems.

It isn't just a matter of restoring the old tunable name, since the
"mdt.*.sync_lock_cancel" name is also used since 2.8 and the code for
the two tunables was recently consolidated in the server target code.

Instead, keep the common "sync_lock_cancel" tunable name, add backward
compatibility for "sync_on_lock_cancel" for a number of releases, and
print a deprecation warning if the old name is used.

Fix up sanity.sh test_80 to check for both the old and new names,
but only if we actually need to change this tunable for ZFS, along
with minor test script style cleanups.

Fixes: 7059644e9ad3 ("LU-8066 ofd: migrate from proc to sysfs")

Lustre-change: https://review.whamcloud.com/36748
Lustre-commit: 7df7347b7b188e7168e094304fd6d2d985f7f274

Change-Id: Iffe65f6268d94075c71b96d42fe60ef11ac39448
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/37037
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lu_target.h
lustre/include/obd.h
lustre/ofd/lproc_ofd.c
lustre/target/tgt_main.c
lustre/tests/sanity.sh