aboutsummaryrefslogtreecommitdiff
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorAl Viro2019-09-06 22:12:08 -0400
committerAl Viro2020-02-07 00:12:50 -0500
commit2710c957a8ef4fb00f21acb306e3bd6bcf80c81f (patch)
treeda60d8ec6779b64cbc29ca2b161ed9b9c0b2834e /fs/ceph/super.c
parent0f89589a8c6f1033cb847a606517998efb0da8ee (diff)
fs_parse: get rid of ->enums
Don't do a single array; attach them to fsparam_enum() entry instead. And don't bother trying to embed the names into those - it actually loses memory, with no real speedup worth mentioning. Simplifies validation as well. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 29a795f975df..0f7c8913bb20 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -163,9 +163,9 @@ enum ceph_recover_session_mode {
ceph_recover_session_clean
};
-static const struct fs_parameter_enum ceph_mount_param_enums[] = {
- { Opt_recover_session, "no", ceph_recover_session_no },
- { Opt_recover_session, "clean", ceph_recover_session_clean },
+static const struct fs_parameter_enum ceph_param_recover[] = {
+ { "no", ceph_recover_session_no },
+ { "clean", ceph_recover_session_clean },
{}
};
@@ -180,7 +180,7 @@ static const struct fs_parameter_spec ceph_mount_param_specs[] = {
fsparam_flag_no ("dcache", Opt_dcache),
fsparam_flag_no ("dirstat", Opt_dirstat),
__fsparam (fs_param_is_string, "fsc", Opt_fscache,
- fs_param_neg_with_no | fs_param_v_optional),
+ fs_param_neg_with_no | fs_param_v_optional, NULL),
fsparam_flag_no ("ino32", Opt_ino32),
fsparam_string ("mds_namespace", Opt_mds_namespace),
fsparam_flag_no ("poolperm", Opt_poolperm),
@@ -189,7 +189,7 @@ static const struct fs_parameter_spec ceph_mount_param_specs[] = {
fsparam_flag_no ("rbytes", Opt_rbytes),
fsparam_u32 ("readdir_max_bytes", Opt_readdir_max_bytes),
fsparam_u32 ("readdir_max_entries", Opt_readdir_max_entries),
- fsparam_enum ("recover_session", Opt_recover_session),
+ fsparam_enum ("recover_session", Opt_recover_session, ceph_param_recover),
fsparam_flag_no ("require_active_mds", Opt_require_active_mds),
fsparam_u32 ("rsize", Opt_rsize),
fsparam_string ("snapdirname", Opt_snapdirname),
@@ -201,7 +201,6 @@ static const struct fs_parameter_spec ceph_mount_param_specs[] = {
static const struct fs_parameter_description ceph_mount_parameters = {
.name = "ceph",
.specs = ceph_mount_param_specs,
- .enums = ceph_mount_param_enums,
};
struct ceph_parse_opts_ctx {