Lines Matching refs:fc
186 static int ovl_parse_monolithic(struct fs_context *fc, void *data) in ovl_parse_monolithic() argument
188 return vfs_parse_monolithic_sep(fc, data, ovl_next_opt); in ovl_parse_monolithic()
276 static int ovl_mount_dir_check(struct fs_context *fc, const struct path *path, in ovl_mount_dir_check() argument
280 struct ovl_fs_context *ctx = fc->fs_private; in ovl_mount_dir_check()
281 struct ovl_fs *ofs = fc->s_fs_info; in ovl_mount_dir_check()
284 return invalfc(fc, "%s is not a directory", name); in ovl_mount_dir_check()
296 return invalfc(fc, "case-%ssensitive directory on %s is inconsistent", in ovl_mount_dir_check()
301 return invalfc(fc, "filesystem on %s not supported", name); in ovl_mount_dir_check()
310 return invalfc(fc, "filesystem on %s not supported as upperdir", name); in ovl_mount_dir_check()
312 return invalfc(fc, "filesystem on %s is read-only", name); in ovl_mount_dir_check()
315 return invalfc(fc, "lowerdir+ and datadir+ cannot follow lowerdir"); in ovl_mount_dir_check()
317 return invalfc(fc, "regular lower layers cannot follow data layers"); in ovl_mount_dir_check()
319 return invalfc(fc, "too many lower directories, limit is %d", in ovl_mount_dir_check()
325 static int ovl_ctx_realloc_lower(struct fs_context *fc) in ovl_ctx_realloc_lower() argument
327 struct ovl_fs_context *ctx = fc->fs_private; in ovl_ctx_realloc_lower()
345 static void ovl_add_layer(struct fs_context *fc, enum ovl_opt layer, in ovl_add_layer() argument
348 struct ovl_fs *ofs = fc->s_fs_info; in ovl_add_layer()
350 struct ovl_fs_context *ctx = fc->fs_private; in ovl_add_layer()
411 static int ovl_do_parse_layer(struct fs_context *fc, const char *layer_name, in ovl_do_parse_layer() argument
422 err = ovl_mount_dir_check(fc, layer_path, layer, name, upper); in ovl_do_parse_layer()
427 err = ovl_ctx_realloc_lower(fc); in ovl_do_parse_layer()
433 ovl_add_layer(fc, layer, layer_path, &name); in ovl_do_parse_layer()
437 static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param, in ovl_parse_layer() argument
448 err = ovl_do_parse_layer(fc, param->string, &layer_path, layer); in ovl_parse_layer()
465 err = ovl_do_parse_layer(fc, layer_name, &layer_path, layer); in ovl_parse_layer()
501 static int ovl_parse_param_lowerdir(const char *name, struct fs_context *fc) in ovl_parse_param_lowerdir() argument
504 struct ovl_fs_context *ctx = fc->fs_private; in ovl_parse_param_lowerdir()
552 err = ovl_do_parse_layer(fc, iter, &path, Opt_lowerdir); in ovl_parse_param_lowerdir()
593 static int ovl_parse_param(struct fs_context *fc, struct fs_parameter *param) in ovl_parse_param() argument
597 struct ovl_fs *ofs = fc->s_fs_info; in ovl_parse_param()
599 struct ovl_fs_context *ctx = fc->fs_private; in ovl_parse_param()
602 if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { in ovl_parse_param()
608 if (fc->oldapi) in ovl_parse_param()
618 return invalfc(fc, "No changes allowed in reconfigure"); in ovl_parse_param()
621 opt = fs_parse(fc, ovl_parameter_spec, param, &result); in ovl_parse_param()
627 err = ovl_parse_param_lowerdir(param->string, fc); in ovl_parse_param()
633 err = ovl_parse_layer(fc, param, opt); in ovl_parse_param()
683 if (!current_in_userns(fc->user_ns)) { in ovl_parse_param()
706 static int ovl_get_tree(struct fs_context *fc) in ovl_get_tree() argument
708 return get_tree_nodev(fc, ovl_fill_super); in ovl_get_tree()
720 static void ovl_free(struct fs_context *fc) in ovl_free() argument
722 struct ovl_fs *ofs = fc->s_fs_info; in ovl_free()
723 struct ovl_fs_context *ctx = fc->fs_private; in ovl_free()
738 static int ovl_reconfigure(struct fs_context *fc) in ovl_reconfigure() argument
740 struct super_block *sb = fc->root->d_sb; in ovl_reconfigure()
745 if (!(fc->sb_flags & SB_RDONLY) && ovl_force_readonly(ofs)) in ovl_reconfigure()
748 if (fc->sb_flags & SB_RDONLY && !sb_rdonly(sb)) { in ovl_reconfigure()
775 int ovl_init_fs_context(struct fs_context *fc) in ovl_init_fs_context() argument
804 fc->s_fs_info = ofs; in ovl_init_fs_context()
805 fc->fs_private = ctx; in ovl_init_fs_context()
806 fc->ops = &ovl_context_ops; in ovl_init_fs_context()