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
279 struct ovl_fs_context *ctx = fc->fs_private; in ovl_mount_dir_check()
282 return invalfc(fc, "%s is not a directory", name); in ovl_mount_dir_check()
289 return invalfc(fc, "case-insensitive directory on %s not supported", name); in ovl_mount_dir_check()
292 return invalfc(fc, "filesystem on %s not supported", name); in ovl_mount_dir_check()
301 return invalfc(fc, "filesystem on %s not supported as upperdir", name); in ovl_mount_dir_check()
303 return invalfc(fc, "filesystem on %s is read-only", name); in ovl_mount_dir_check()
306 return invalfc(fc, "lowerdir+ and datadir+ cannot follow lowerdir"); in ovl_mount_dir_check()
308 return invalfc(fc, "regular lower layers cannot follow data layers"); in ovl_mount_dir_check()
310 return invalfc(fc, "too many lower directories, limit is %d", in ovl_mount_dir_check()
316 static int ovl_ctx_realloc_lower(struct fs_context *fc) in ovl_ctx_realloc_lower() argument
318 struct ovl_fs_context *ctx = fc->fs_private; in ovl_ctx_realloc_lower()
336 static void ovl_add_layer(struct fs_context *fc, enum ovl_opt layer, in ovl_add_layer() argument
339 struct ovl_fs *ofs = fc->s_fs_info; in ovl_add_layer()
341 struct ovl_fs_context *ctx = fc->fs_private; in ovl_add_layer()
402 static int ovl_do_parse_layer(struct fs_context *fc, const char *layer_name, in ovl_do_parse_layer() argument
413 err = ovl_mount_dir_check(fc, layer_path, layer, name, upper); in ovl_do_parse_layer()
418 err = ovl_ctx_realloc_lower(fc); in ovl_do_parse_layer()
424 ovl_add_layer(fc, layer, layer_path, &name); in ovl_do_parse_layer()
428 static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param, in ovl_parse_layer() argument
439 err = ovl_do_parse_layer(fc, param->string, &layer_path, layer); in ovl_parse_layer()
456 err = ovl_do_parse_layer(fc, layer_name, &layer_path, layer); in ovl_parse_layer()
492 static int ovl_parse_param_lowerdir(const char *name, struct fs_context *fc) in ovl_parse_param_lowerdir() argument
495 struct ovl_fs_context *ctx = fc->fs_private; in ovl_parse_param_lowerdir()
543 err = ovl_do_parse_layer(fc, iter, &path, Opt_lowerdir); in ovl_parse_param_lowerdir()
584 static int ovl_parse_param(struct fs_context *fc, struct fs_parameter *param) in ovl_parse_param() argument
588 struct ovl_fs *ofs = fc->s_fs_info; in ovl_parse_param()
590 struct ovl_fs_context *ctx = fc->fs_private; in ovl_parse_param()
593 if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { in ovl_parse_param()
599 if (fc->oldapi) in ovl_parse_param()
609 return invalfc(fc, "No changes allowed in reconfigure"); in ovl_parse_param()
612 opt = fs_parse(fc, ovl_parameter_spec, param, &result); in ovl_parse_param()
618 err = ovl_parse_param_lowerdir(param->string, fc); in ovl_parse_param()
624 err = ovl_parse_layer(fc, param, opt); in ovl_parse_param()
674 if (!current_in_userns(fc->user_ns)) { in ovl_parse_param()
697 static int ovl_get_tree(struct fs_context *fc) in ovl_get_tree() argument
699 return get_tree_nodev(fc, ovl_fill_super); in ovl_get_tree()
711 static void ovl_free(struct fs_context *fc) in ovl_free() argument
713 struct ovl_fs *ofs = fc->s_fs_info; in ovl_free()
714 struct ovl_fs_context *ctx = fc->fs_private; in ovl_free()
729 static int ovl_reconfigure(struct fs_context *fc) in ovl_reconfigure() argument
731 struct super_block *sb = fc->root->d_sb; in ovl_reconfigure()
736 if (!(fc->sb_flags & SB_RDONLY) && ovl_force_readonly(ofs)) in ovl_reconfigure()
739 if (fc->sb_flags & SB_RDONLY && !sb_rdonly(sb)) { in ovl_reconfigure()
766 int ovl_init_fs_context(struct fs_context *fc) in ovl_init_fs_context() argument
795 fc->s_fs_info = ofs; in ovl_init_fs_context()
796 fc->fs_private = ctx; in ovl_init_fs_context()
797 fc->ops = &ovl_context_ops; in ovl_init_fs_context()