[PATCH] ubifs: Add option to create UBI FS version 4 on empty UBI volume

Richard Weinberger richard at nod.at
Sun Mar 11 12:25:51 PDT 2018


Hauke,

Am Sonntag, 11. März 2018, 17:04:51 CET schrieb Hauke Mehrtens:
> Instead of creating an ubifs file system with format version 5 by
> default on empty UBI volumes add a compile option to create an older ubi
> with file system format version 4 instated. This allows it to be mount
> as a volume on kernel versions < 4.10, which does not support format
> version 5.
> We saw that some people can not access their older data when they
> downgraded from kernel 4.14 to kernel 4.9 to prevent this this option
> would help.

I agree, we should address this.

> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
>  fs/ubifs/Kconfig | 13 +++++++++++++
>  fs/ubifs/sb.c    |  6 ++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/fs/ubifs/Kconfig b/fs/ubifs/Kconfig
> index 83a961bf7280..a1426b865726 100644
> --- a/fs/ubifs/Kconfig
> +++ b/fs/ubifs/Kconfig
> @@ -74,3 +74,16 @@ config UBIFS_FS_SECURITY
>  	  the extended attribute support in advance.
> 
>  	  If you are not using a security module, say N.
> +
> +config UBIFS_FS_FORMAT4

A new config option is IMHO too coarse grained.
Sadly ubifs rejects unknown mount parameters, so having it as mount option is 
also not feasible since old kernels will refuse to mount then.

Please make it a module parameter. For example ubifs.default_version.

Thanks,
//richard



More information about the linux-mtd mailing list