Lines Matching refs:config

76 static const char *ovl_uuid_mode(struct ovl_config *config)  in ovl_uuid_mode()  argument
78 return ovl_parameter_uuid[config->uuid].name; in ovl_uuid_mode()
93 const char *ovl_xino_mode(struct ovl_config *config) in ovl_xino_mode() argument
95 return ovl_parameter_xino[config->xino].name; in ovl_xino_mode()
111 static const char *ovl_redirect_mode(struct ovl_config *config) in ovl_redirect_mode() argument
113 return ovl_parameter_redirect_dir[config->redirect_mode].name; in ovl_redirect_mode()
130 static const char *ovl_verity_mode(struct ovl_config *config) in ovl_verity_mode() argument
132 return ovl_parameter_verity[config->verity_mode].name; in ovl_verity_mode()
296 struct ovl_config *config = &ofs->config; in ovl_parse_param_upperdir() local
322 kfree(config->workdir); in ovl_parse_param_upperdir()
323 config->workdir = dup; in ovl_parse_param_upperdir()
327 kfree(config->upperdir); in ovl_parse_param_upperdir()
328 config->upperdir = dup; in ovl_parse_param_upperdir()
528 struct ovl_config *config = &ofs->config; in ovl_parse_param() local
566 config->default_permissions = true; in ovl_parse_param()
569 config->redirect_mode = result.uint_32; in ovl_parse_param()
570 if (config->redirect_mode == OVL_REDIRECT_OFF) { in ovl_parse_param()
571 config->redirect_mode = ovl_redirect_always_follow ? in ovl_parse_param()
578 config->index = result.uint_32; in ovl_parse_param()
582 config->uuid = result.uint_32; in ovl_parse_param()
585 config->nfs_export = result.uint_32; in ovl_parse_param()
589 config->xino = result.uint_32; in ovl_parse_param()
592 config->metacopy = result.uint_32; in ovl_parse_param()
596 config->verity_mode = result.uint_32; in ovl_parse_param()
599 config->ovl_volatile = true; in ovl_parse_param()
602 config->userxattr = true; in ovl_parse_param()
704 ofs->config.redirect_mode = ovl_redirect_mode_def(); in ovl_init_fs_context()
705 ofs->config.index = ovl_index_def; in ovl_init_fs_context()
706 ofs->config.uuid = ovl_uuid_def(); in ovl_init_fs_context()
707 ofs->config.nfs_export = ovl_nfs_export_def; in ovl_init_fs_context()
708 ofs->config.xino = ovl_xino_def(); in ovl_init_fs_context()
709 ofs->config.metacopy = ovl_metacopy_def; in ovl_init_fs_context()
740 mounts = (struct vfsmount **) ofs->config.lowerdirs; in ovl_free_fs()
743 kfree(ofs->config.lowerdirs[i]); in ovl_free_fs()
752 kfree(ofs->config.lowerdirs); in ovl_free_fs()
753 kfree(ofs->config.upperdir); in ovl_free_fs()
754 kfree(ofs->config.workdir); in ovl_free_fs()
761 struct ovl_config *config) in ovl_fs_params_verify() argument
765 if (ctx->nr_data > 0 && !config->metacopy) { in ovl_fs_params_verify()
771 if (!config->upperdir) { in ovl_fs_params_verify()
772 if (config->workdir) { in ovl_fs_params_verify()
774 config->workdir); in ovl_fs_params_verify()
775 kfree(config->workdir); in ovl_fs_params_verify()
776 config->workdir = NULL; in ovl_fs_params_verify()
778 if (config->index && set.index) { in ovl_fs_params_verify()
782 config->index = false; in ovl_fs_params_verify()
785 if (!config->upperdir && config->ovl_volatile) { in ovl_fs_params_verify()
787 config->ovl_volatile = false; in ovl_fs_params_verify()
790 if (!config->upperdir && config->uuid == OVL_UUID_ON) { in ovl_fs_params_verify()
792 config->uuid = OVL_UUID_NULL; in ovl_fs_params_verify()
796 if (config->verity_mode && !config->metacopy) { in ovl_fs_params_verify()
800 ovl_verity_mode(config)); in ovl_fs_params_verify()
804 config->metacopy = true; in ovl_fs_params_verify()
811 if (!config->upperdir && config->redirect_mode == OVL_REDIRECT_FOLLOW) in ovl_fs_params_verify()
812 config->redirect_mode = OVL_REDIRECT_ON; in ovl_fs_params_verify()
815 if (config->metacopy && config->redirect_mode != OVL_REDIRECT_ON) { in ovl_fs_params_verify()
818 ovl_redirect_mode(config)); in ovl_fs_params_verify()
821 if (config->verity_mode && set.redirect) { in ovl_fs_params_verify()
823 ovl_verity_mode(config), ovl_redirect_mode(config)); in ovl_fs_params_verify()
832 ovl_redirect_mode(config)); in ovl_fs_params_verify()
833 config->metacopy = false; in ovl_fs_params_verify()
836 config->redirect_mode = OVL_REDIRECT_ON; in ovl_fs_params_verify()
841 if (config->nfs_export && !config->index) { in ovl_fs_params_verify()
842 if (!config->upperdir && in ovl_fs_params_verify()
843 config->redirect_mode != OVL_REDIRECT_NOFOLLOW) { in ovl_fs_params_verify()
845 config->nfs_export = false; in ovl_fs_params_verify()
855 config->nfs_export = false; in ovl_fs_params_verify()
858 config->index = true; in ovl_fs_params_verify()
863 if (config->nfs_export && config->metacopy) { in ovl_fs_params_verify()
874 config->nfs_export = false; in ovl_fs_params_verify()
875 } else if (config->verity_mode) { in ovl_fs_params_verify()
881 ovl_verity_mode(config)); in ovl_fs_params_verify()
882 config->nfs_export = false; in ovl_fs_params_verify()
889 config->metacopy = false; in ovl_fs_params_verify()
895 if (config->userxattr) { in ovl_fs_params_verify()
897 config->redirect_mode != OVL_REDIRECT_NOFOLLOW) { in ovl_fs_params_verify()
899 ovl_redirect_mode(config)); in ovl_fs_params_verify()
902 if (config->metacopy && set.metacopy) { in ovl_fs_params_verify()
906 if (config->verity_mode) { in ovl_fs_params_verify()
908 ovl_verity_mode(config)); in ovl_fs_params_verify()
917 config->redirect_mode = OVL_REDIRECT_NOFOLLOW; in ovl_fs_params_verify()
918 config->metacopy = false; in ovl_fs_params_verify()
952 seq_escape(m, ofs->config.lowerdirs[nr], ":, \t\n\\"); in ovl_show_options()
954 if (ofs->config.upperdir) { in ovl_show_options()
955 seq_show_option(m, "upperdir", ofs->config.upperdir); in ovl_show_options()
956 seq_show_option(m, "workdir", ofs->config.workdir); in ovl_show_options()
958 if (ofs->config.default_permissions) in ovl_show_options()
960 if (ofs->config.redirect_mode != ovl_redirect_mode_def()) in ovl_show_options()
962 ovl_redirect_mode(&ofs->config)); in ovl_show_options()
963 if (ofs->config.index != ovl_index_def) in ovl_show_options()
964 seq_printf(m, ",index=%s", ofs->config.index ? "on" : "off"); in ovl_show_options()
965 if (ofs->config.uuid != ovl_uuid_def()) in ovl_show_options()
966 seq_printf(m, ",uuid=%s", ovl_uuid_mode(&ofs->config)); in ovl_show_options()
967 if (ofs->config.nfs_export != ovl_nfs_export_def) in ovl_show_options()
968 seq_printf(m, ",nfs_export=%s", ofs->config.nfs_export ? in ovl_show_options()
970 if (ofs->config.xino != ovl_xino_def() && !ovl_same_fs(ofs)) in ovl_show_options()
971 seq_printf(m, ",xino=%s", ovl_xino_mode(&ofs->config)); in ovl_show_options()
972 if (ofs->config.metacopy != ovl_metacopy_def) in ovl_show_options()
974 ofs->config.metacopy ? "on" : "off"); in ovl_show_options()
975 if (ofs->config.ovl_volatile) in ovl_show_options()
977 if (ofs->config.userxattr) in ovl_show_options()
979 if (ofs->config.verity_mode != ovl_verity_mode_def()) in ovl_show_options()
981 ovl_verity_mode(&ofs->config)); in ovl_show_options()