From 22f2344a13d38c8ceea9fba87bfb125ed19fa35e Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 7 May 2025 17:59:26 -0400 Subject: [PATCH] LU-18959 ofd: remove sync_on_lock_cancel tunable Now that enough time passed we don't need anymore Revert "LU-12967 ofd: restore sync_on_lock_cancel tunable" This reverts commit 7df7347b7b188e7168e094304fd6d2d985f7f274. Except the sanity.sh portion Test-Parameters: trivial Signed-off-by: Oleg Drokin Change-Id: I871ea7ba90bb2f193c967cdd184bbf392916b525 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59145 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/include/lu_target.h | 6 ------ lustre/ofd/lproc_ofd.c | 25 ------------------------- lustre/target/tgt_main.c | 12 +++++------- lustre/tests/sanity.sh | 1 + 4 files changed, 6 insertions(+), 38 deletions(-) diff --git a/lustre/include/lu_target.h b/lustre/include/lu_target.h index 6f51f6b..ff631fa 100644 --- a/lustre/include/lu_target.h +++ b/lustre/include/lu_target.h @@ -571,12 +571,6 @@ ssize_t grant_compat_disable_show(struct kobject *kobj, struct attribute *attr, ssize_t grant_compat_disable_store(struct kobject *kobj, struct attribute *attr, const char *buffer, size_t count); -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0) -ssize_t sync_lock_cancel_show(struct kobject *kobj, - struct attribute *attr, char *buf); -ssize_t sync_lock_cancel_store(struct kobject *kobj, struct attribute *attr, - const char *buffer, size_t count); -#endif /* FMD */ void tgt_fmd_update(struct obd_export *exp, const struct lu_fid *fid, diff --git a/lustre/ofd/lproc_ofd.c b/lustre/ofd/lproc_ofd.c index b254a9f..48fd75e 100644 --- a/lustre/ofd/lproc_ofd.c +++ b/lustre/ofd/lproc_ofd.c @@ -509,28 +509,6 @@ static ssize_t brw_size_store(struct kobject *kobj, struct attribute *attr, } LUSTRE_RW_ATTR(brw_size); -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0) -static ssize_t sync_on_lock_cancel_show(struct kobject *kobj, - struct attribute *attr, char *buf) -{ - return sync_lock_cancel_show(kobj, attr, buf); -} - -static ssize_t sync_on_lock_cancel_store(struct kobject *kobj, - struct attribute *attr, - const char *buffer, size_t count) -{ - static bool sync_on_lock_cancel_warned; - - if (!sync_on_lock_cancel_warned) { - sync_on_lock_cancel_warned = true; - pr_info("ofd: 'obdfilter.*.sync_on_lock_cancel' is deprecated, use 'obdfilter.*.sync_lock_cancel' instead\n"); - } - return sync_lock_cancel_store(kobj, attr, buffer, count); -} -LUSTRE_RW_ATTR(sync_on_lock_cancel); -#endif - /** * Show the limit of soft sync RPCs. * @@ -1033,9 +1011,6 @@ static struct attribute *ofd_attrs[] = { &lustre_attr_tot_pending.attr, &lustre_attr_soft_sync_limit.attr, &lustre_attr_sync_journal.attr, -#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0) - &lustre_attr_sync_on_lock_cancel.attr, -#endif &lustre_attr_at_min.attr, &lustre_attr_at_max.attr, &lustre_attr_at_history.attr, diff --git a/lustre/target/tgt_main.c b/lustre/target/tgt_main.c index 1665f2b..4505c5f 100644 --- a/lustre/target/tgt_main.c +++ b/lustre/target/tgt_main.c @@ -16,7 +16,6 @@ #include #include #include "tgt_internal.h" -#include "lu_target.h" #include "../ptlrpc/ptlrpc_internal.h" /* This must be longer than the longest string below */ @@ -37,8 +36,8 @@ static const char * const sync_lock_cancel_states[] = { * \retval 0 and buffer filled with data on success * \retval negative value on error */ -ssize_t sync_lock_cancel_show(struct kobject *kobj, - struct attribute *attr, char *buf) +static ssize_t sync_lock_cancel_show(struct kobject *kobj, + struct attribute *attr, char *buf) { struct obd_device *obd = container_of(kobj, struct obd_device, obd_kset.kobj); @@ -47,7 +46,6 @@ ssize_t sync_lock_cancel_show(struct kobject *kobj, return sprintf(buf, "%s\n", sync_lock_cancel_states[tgt->lut_sync_lock_cancel]); } -EXPORT_SYMBOL(sync_lock_cancel_show); /** * Change policy for handling dirty data under a lock being cancelled. @@ -70,8 +68,9 @@ EXPORT_SYMBOL(sync_lock_cancel_show); * \retval \a count on success * \retval negative value on error */ -ssize_t sync_lock_cancel_store(struct kobject *kobj, struct attribute *attr, - const char *buffer, size_t count) +static ssize_t sync_lock_cancel_store(struct kobject *kobj, + struct attribute *attr, + const char *buffer, size_t count) { struct obd_device *obd = container_of(kobj, struct obd_device, obd_kset.kobj); @@ -104,7 +103,6 @@ ssize_t sync_lock_cancel_store(struct kobject *kobj, struct attribute *attr, spin_unlock(&tgt->lut_flags_lock); return count; } -EXPORT_SYMBOL(sync_lock_cancel_store); LUSTRE_RW_ATTR(sync_lock_cancel); /** diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 73d7354..434327e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -12339,6 +12339,7 @@ test_80() { # bug 10718 local save=$(do_facet ost1 $LCTL get_param -n $soc | head -n1) # "sync_on_lock_cancel" was broken by v2_11_55_0-26-g7059644e9a + # Fixed in 2.13.51~79, so we'll keep it for interop with 2.12.x if [ -z "$save" ]; then soc="obdfilter.*.sync_on_lock_cancel" save=$(do_facet ost1 $LCTL get_param -n $soc | head -n1) -- 1.8.3.1