+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0)
+static bool sync_on_lock_cancel_warned;
+static ssize_t sync_on_lock_cancel_show(struct kobject *kobj,
+ struct attribute *attr, char *buf)
+{
+ 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_show(kobj, attr, buf);
+}
+
+static ssize_t sync_on_lock_cancel_store(struct kobject *kobj,
+ struct attribute *attr,
+ const char *buffer, size_t count)
+{
+ 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
+