params.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. #include <linux/fs_context.h>
  3. #include <linux/fs_parser.h>
  4. struct ovl_fs;
  5. struct ovl_config;
  6. extern const struct fs_parameter_spec ovl_parameter_spec[];
  7. extern const struct constant_table ovl_parameter_redirect_dir[];
  8. /* The set of options that user requested explicitly via mount options */
  9. struct ovl_opt_set {
  10. bool metacopy;
  11. bool redirect;
  12. bool nfs_export;
  13. bool index;
  14. };
  15. #define OVL_MAX_STACK 500
  16. struct ovl_fs_context_layer {
  17. char *name;
  18. struct path path;
  19. };
  20. struct ovl_fs_context {
  21. struct path upper;
  22. struct path work;
  23. size_t capacity;
  24. size_t nr; /* includes nr_data */
  25. size_t nr_data;
  26. struct ovl_opt_set set;
  27. struct ovl_fs_context_layer *lower;
  28. char *lowerdir_all; /* user provided lowerdir string */
  29. };
  30. int ovl_init_fs_context(struct fs_context *fc);
  31. void ovl_free_fs(struct ovl_fs *ofs);
  32. int ovl_fs_params_verify(const struct ovl_fs_context *ctx,
  33. struct ovl_config *config);
  34. int ovl_show_options(struct seq_file *m, struct dentry *dentry);
  35. const char *ovl_xino_mode(struct ovl_config *config);