]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: mount syntax module parameter
authorVenky Shankar <vshankar@redhat.com>
Wed, 3 Nov 2021 05:00:39 +0000 (10:30 +0530)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 8 Nov 2021 02:31:04 +0000 (03:31 +0100)
Add read-only module parameters for supported mount syntaxes. Primary
user is the user-space mount helper for catching v2 syntax bugs during
testing by cross verifying if the kernel supports v2 syntax on mount
failure.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/super.c

index d401b5ee6d646d1e1777fe11949e7a35044d53fc..8d6daea351f63a85d529d34a629b68a072e393ca 100644 (file)
@@ -1464,6 +1464,14 @@ bool disable_send_metrics = false;
 module_param_cb(disable_send_metrics, &param_ops_metrics, &disable_send_metrics, 0644);
 MODULE_PARM_DESC(disable_send_metrics, "Enable sending perf metrics to ceph cluster (default: on)");
 
+/* for both v1 and v2 syntax */
+static bool mount_support = true;
+static const struct kernel_param_ops param_ops_mount_syntax = {
+       .get = param_get_bool,
+};
+module_param_cb(mount_syntax_v1, &param_ops_mount_syntax, &mount_support, 0444);
+module_param_cb(mount_syntax_v2, &param_ops_mount_syntax, &mount_support, 0444);
+
 module_init(init_ceph);
 module_exit(exit_ceph);