summaryrefslogtreecommitdiffstats
path: root/fs/dlm/user.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-06-22 14:45:22 -0400
committerDavid Teigland <teigland@redhat.com>2022-08-01 09:31:32 -0500
commit81eeb82fc215afec7a0511dd5eab6b9cac8dac39 (patch)
treecf4364c835ec7f79fa487e1464fb0b46ba762d05 /fs/dlm/user.c
parent8d614a4457f5515be54dca6f0b95b6a9f968a888 (diff)
downloadlinux-81eeb82fc215afec7a0511dd5eab6b9cac8dac39.tar.gz
linux-81eeb82fc215afec7a0511dd5eab6b9cac8dac39.tar.bz2
linux-81eeb82fc215afec7a0511dd5eab6b9cac8dac39.zip
fs: dlm: add deprecation Kconfig and warnings for timeouts
This patch adds a CONFIG_DLM_DEPRECATED_API Kconfig option that must be enabled to use two timeout-related features that we intend to remove in kernel v6.2. Warnings are printed if either is enabled and used. Neither has ever been used as far as we know. . The DLM_LSFL_TIMEWARN lockspace creation flag will be removed, along with the associated configfs entry for setting the timeout. Setting the flag and configfs file would cause dlm to track how long locks were waiting for reply messages. After a timeout, a kernel message would be logged, and a netlink message would be sent to userspace. Recently, midcomms messages have been added that produce much better logging about actual problems with messages. No use has ever been found for the netlink messages. . The userspace libdlm API has allowed the DLM_LKF_TIMEOUT flag with a timeout value to be set in lock requests. The lock request would be cancelled after the timeout. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/user.c')
-rw-r--r--fs/dlm/user.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 4b2a24a6a15d..32452d7a466c 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -250,6 +250,14 @@ static int device_user_lock(struct dlm_user_proc *proc,
goto out;
}
+#ifdef CONFIG_DLM_DEPRECATED_API
+ if (params->timeout)
+ pr_warn_once("========================================================\n"
+ "WARNING: the lkb timeout feature is being deprecated and\n"
+ " will be removed in v6.2!\n"
+ "========================================================\n");
+#endif
+
ua = kzalloc(sizeof(struct dlm_user_args), GFP_NOFS);
if (!ua)
goto out;