Lines Matching refs:config

78 static const char *ovl_uuid_mode(struct ovl_config *config)  in ovl_uuid_mode()  argument
80 return ovl_parameter_uuid[config->uuid].name; in ovl_uuid_mode()
95 const char *ovl_xino_mode(struct ovl_config *config) in ovl_xino_mode() argument
97 return ovl_parameter_xino[config->xino].name; in ovl_xino_mode()
113 static const char *ovl_redirect_mode(struct ovl_config *config) in ovl_redirect_mode() argument
115 return ovl_parameter_redirect_dir[config->redirect_mode].name; in ovl_redirect_mode()
132 static const char *ovl_verity_mode(struct ovl_config *config) in ovl_verity_mode() argument
134 return ovl_parameter_verity[config->verity_mode].name; in ovl_verity_mode()
340 struct ovl_config *config = &ofs->config; in ovl_add_layer() local
346 swap(config->workdir, *pname); in ovl_add_layer()
350 swap(config->upperdir, *pname); in ovl_add_layer()
523 struct ovl_config *config = &ofs->config; in ovl_parse_param() local
561 config->default_permissions = true; in ovl_parse_param()
564 config->redirect_mode = result.uint_32; in ovl_parse_param()
565 if (config->redirect_mode == OVL_REDIRECT_OFF) { in ovl_parse_param()
566 config->redirect_mode = ovl_redirect_always_follow ? in ovl_parse_param()
573 config->index = result.uint_32; in ovl_parse_param()
577 config->uuid = result.uint_32; in ovl_parse_param()
580 config->nfs_export = result.uint_32; in ovl_parse_param()
584 config->xino = result.uint_32; in ovl_parse_param()
587 config->metacopy = result.uint_32; in ovl_parse_param()
591 config->verity_mode = result.uint_32; in ovl_parse_param()
594 config->ovl_volatile = true; in ovl_parse_param()
597 config->userxattr = true; in ovl_parse_param()
699 ofs->config.redirect_mode = ovl_redirect_mode_def(); in ovl_init_fs_context()
700 ofs->config.index = ovl_index_def; in ovl_init_fs_context()
701 ofs->config.uuid = ovl_uuid_def(); in ovl_init_fs_context()
702 ofs->config.nfs_export = ovl_nfs_export_def; in ovl_init_fs_context()
703 ofs->config.xino = ovl_xino_def(); in ovl_init_fs_context()
704 ofs->config.metacopy = ovl_metacopy_def; in ovl_init_fs_context()
733 mounts = (struct vfsmount **) ofs->config.lowerdirs; in ovl_free_fs()
736 kfree(ofs->config.lowerdirs[i]); in ovl_free_fs()
745 kfree(ofs->config.lowerdirs); in ovl_free_fs()
746 kfree(ofs->config.upperdir); in ovl_free_fs()
747 kfree(ofs->config.workdir); in ovl_free_fs()
754 struct ovl_config *config) in ovl_fs_params_verify() argument
759 if (!config->upperdir) { in ovl_fs_params_verify()
760 if (config->workdir) { in ovl_fs_params_verify()
762 config->workdir); in ovl_fs_params_verify()
763 kfree(config->workdir); in ovl_fs_params_verify()
764 config->workdir = NULL; in ovl_fs_params_verify()
766 if (config->index && set.index) { in ovl_fs_params_verify()
770 config->index = false; in ovl_fs_params_verify()
773 if (!config->upperdir && config->ovl_volatile) { in ovl_fs_params_verify()
775 config->ovl_volatile = false; in ovl_fs_params_verify()
778 if (!config->upperdir && config->uuid == OVL_UUID_ON) { in ovl_fs_params_verify()
780 config->uuid = OVL_UUID_NULL; in ovl_fs_params_verify()
784 if (config->verity_mode && !config->metacopy) { in ovl_fs_params_verify()
788 ovl_verity_mode(config)); in ovl_fs_params_verify()
792 config->metacopy = true; in ovl_fs_params_verify()
799 if (!config->upperdir && config->redirect_mode == OVL_REDIRECT_FOLLOW) in ovl_fs_params_verify()
800 config->redirect_mode = OVL_REDIRECT_ON; in ovl_fs_params_verify()
803 if (config->metacopy && config->redirect_mode != OVL_REDIRECT_ON) { in ovl_fs_params_verify()
806 ovl_redirect_mode(config)); in ovl_fs_params_verify()
809 if (config->verity_mode && set.redirect) { in ovl_fs_params_verify()
811 ovl_verity_mode(config), ovl_redirect_mode(config)); in ovl_fs_params_verify()
820 ovl_redirect_mode(config)); in ovl_fs_params_verify()
821 config->metacopy = false; in ovl_fs_params_verify()
824 config->redirect_mode = OVL_REDIRECT_ON; in ovl_fs_params_verify()
829 if (config->nfs_export && !config->index) { in ovl_fs_params_verify()
830 if (!config->upperdir && in ovl_fs_params_verify()
831 config->redirect_mode != OVL_REDIRECT_NOFOLLOW) { in ovl_fs_params_verify()
833 config->nfs_export = false; in ovl_fs_params_verify()
843 config->nfs_export = false; in ovl_fs_params_verify()
846 config->index = true; in ovl_fs_params_verify()
851 if (config->nfs_export && config->metacopy) { in ovl_fs_params_verify()
862 config->nfs_export = false; in ovl_fs_params_verify()
863 } else if (config->verity_mode) { in ovl_fs_params_verify()
869 ovl_verity_mode(config)); in ovl_fs_params_verify()
870 config->nfs_export = false; in ovl_fs_params_verify()
877 config->metacopy = false; in ovl_fs_params_verify()
883 if (config->userxattr) { in ovl_fs_params_verify()
885 config->redirect_mode != OVL_REDIRECT_NOFOLLOW) { in ovl_fs_params_verify()
887 ovl_redirect_mode(config)); in ovl_fs_params_verify()
890 if (config->metacopy && set.metacopy) { in ovl_fs_params_verify()
894 if (config->verity_mode) { in ovl_fs_params_verify()
896 ovl_verity_mode(config)); in ovl_fs_params_verify()
905 config->redirect_mode = OVL_REDIRECT_NOFOLLOW; in ovl_fs_params_verify()
906 config->metacopy = false; in ovl_fs_params_verify()
913 if (!config->userxattr && !capable(CAP_SYS_ADMIN)) { in ovl_fs_params_verify()
915 config->redirect_mode != OVL_REDIRECT_NOFOLLOW) { in ovl_fs_params_verify()
919 if (config->metacopy && set.metacopy) { in ovl_fs_params_verify()
923 if (config->verity_mode) { in ovl_fs_params_verify()
937 if (ctx->nr_data > 0 && !config->metacopy) { in ovl_fs_params_verify()
958 char **lowerdirs = ofs->config.lowerdirs; in ovl_show_options()
980 if (ofs->config.upperdir) { in ovl_show_options()
981 seq_show_option(m, "upperdir", ofs->config.upperdir); in ovl_show_options()
982 seq_show_option(m, "workdir", ofs->config.workdir); in ovl_show_options()
984 if (ofs->config.default_permissions) in ovl_show_options()
986 if (ofs->config.redirect_mode != ovl_redirect_mode_def()) in ovl_show_options()
988 ovl_redirect_mode(&ofs->config)); in ovl_show_options()
989 if (ofs->config.index != ovl_index_def) in ovl_show_options()
990 seq_printf(m, ",index=%s", ofs->config.index ? "on" : "off"); in ovl_show_options()
991 if (ofs->config.uuid != ovl_uuid_def()) in ovl_show_options()
992 seq_printf(m, ",uuid=%s", ovl_uuid_mode(&ofs->config)); in ovl_show_options()
993 if (ofs->config.nfs_export != ovl_nfs_export_def) in ovl_show_options()
994 seq_printf(m, ",nfs_export=%s", ofs->config.nfs_export ? in ovl_show_options()
996 if (ofs->config.xino != ovl_xino_def() && !ovl_same_fs(ofs)) in ovl_show_options()
997 seq_printf(m, ",xino=%s", ovl_xino_mode(&ofs->config)); in ovl_show_options()
998 if (ofs->config.metacopy != ovl_metacopy_def) in ovl_show_options()
1000 ofs->config.metacopy ? "on" : "off"); in ovl_show_options()
1001 if (ofs->config.ovl_volatile) in ovl_show_options()
1003 if (ofs->config.userxattr) in ovl_show_options()
1005 if (ofs->config.verity_mode != ovl_verity_mode_def()) in ovl_show_options()
1007 ovl_verity_mode(&ofs->config)); in ovl_show_options()