Re: [PATCH v2 4/5] ovl: store enum redirect_mode in config instead of a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 17, 2023 at 11:47:01AM +0300, Amir Goldstein wrote:
> 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@xxxxxxxxx>
> ---

Looks good to me,
Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux