linux-stable/fs/overlayfs
Amir Goldstein af5f2396b6 ovl: store enum redirect_mode in config instead of a string
Do all the logic to set the mode during mount options parsing and
do not keep the option string around.

Use a constant_table to translate from enum redirect mode to string
in preperation for new mount api option parsing.

The mount option "off" is translated to either "follow" or "nofollow",
depending on the "redirect_always_follow" build/module config, so
in effect, there are only three possible redirect modes.

This results in a minor change to the string that is displayed
in show_options() - when redirect_dir is enabled by default and the user
mounts with the option "redirect_dir=off", instead of displaying the mode
"redirect_dir=off" in show_options(), the displayed mode will be either
"redirect_dir=follow" or "redirect_dir=nofollow", depending on the value
of "redirect_always_follow" build/module config.

The displayed mode reflects the effective mode, so mounting overlayfs
again with the dispalyed redirect_dir option will result with the same
effective and displayed mode.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2023-06-19 14:02:01 +03:00
..
copy_up.c ovl: implement lazy lookup of lowerdata in data-only layers 2023-06-19 14:01:14 +03:00
dir.c ovl: store enum redirect_mode in config instead of a string 2023-06-19 14:02:01 +03:00
export.c ovl: deduplicate lowerpath and lowerstack[] 2023-06-19 14:01:13 +03:00
file.c ovl: implement lazy lookup of lowerdata in data-only layers 2023-06-19 14:01:14 +03:00
inode.c ovl: pass ovl_fs to xino helpers 2023-06-19 14:02:00 +03:00
Kconfig ovl: Kconfig: Fix spelling mistake "undelying" -> "underlying" 2022-12-08 10:49:46 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
namei.c ovl: store enum redirect_mode in config instead of a string 2023-06-19 14:02:01 +03:00
overlayfs.h ovl: store enum redirect_mode in config instead of a string 2023-06-19 14:02:01 +03:00
ovl_entry.h ovl: store enum redirect_mode in config instead of a string 2023-06-19 14:02:01 +03:00
readdir.c ovl: pass ovl_fs to xino helpers 2023-06-19 14:02:00 +03:00
super.c ovl: store enum redirect_mode in config instead of a string 2023-06-19 14:02:01 +03:00
util.c ovl: store enum redirect_mode in config instead of a string 2023-06-19 14:02:01 +03:00