Whamcloud - gitweb
LU-18959 ofd: remove sync_on_lock_cancel tunable 45/59145/6 master
authorOleg Drokin <green@whamcloud.com>
Wed, 7 May 2025 21:59:26 +0000 (17:59 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:07:36 +0000 (04:07 +0000)
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 <green@whamcloud.com>
Change-Id: I871ea7ba90bb2f193c967cdd184bbf392916b525
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59145
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lu_target.h
lustre/ofd/lproc_ofd.c
lustre/target/tgt_main.c
lustre/tests/sanity.sh

index 6f51f6b..ff631fa 100644 (file)
@@ -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,
index b254a9f..48fd75e 100644 (file)
@@ -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,
index 1665f2b..4505c5f 100644 (file)
@@ -16,7 +16,6 @@
 #include <obd_target.h>
 #include <obd_cksum.h>
 #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);
 
 /**
index 73d7354..434327e 100755 (executable)
@@ -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)