Whamcloud - gitweb
LU-12967 ofd: restore sync_on_lock_cancel tunable 48/36748/4
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Nov 2019 00:56:35 +0000 (17:56 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2019 05:59:31 +0000 (05:59 +0000)
commit7df7347b7b188e7168e094304fd6d2d985f7f274
tree9969542fcaa3d8de51ff407cb19ecb4a19129a7d
parent6c6ca1fbfb1b2be0e6a9675f9214f98e59bc8088
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")
Change-Id: Iffe65f6268d94075c71b96d42fe60ef11ac39448
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36748
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lustre/include/lu_target.h
lustre/include/obd.h
lustre/ofd/lproc_ofd.c
lustre/target/tgt_main.c
lustre/tests/sanity.sh