[LEDE-DEV] ubifs file system format change kernel 4.14

Hauke Mehrtens hauke at hauke-m.de
Sun Jan 7 09:12:53 PST 2018


Hi,

Since kernel 4.14 the ubifs file system driver support the format 5,
older kernel versions only support version 4, see this:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc4b891bbefa73b496bb44b076bb5274b6bfba68

This causes no problems when mounting a file systems created with kernel
4.9 on kernel 4.14, but it causes problems when doing this the other way
around, see this: (reported by Lucian on mvebu)
[    8.180438] UBIFS error (ubi0:1 pid 777): ubifs_read_superblock:
on-flash format version is w5/r0, but software only supports up to
version w4/r0
[    8.193549] UBIFS (ubi0:1): only R/O mounting is possible
[    8.199662] UBIFS error (ubi0:1 pid 774): ubifs_read_superblock:
on-flash format version is w5/r0, but software only supports up to
version w4/r0
[    8.212770] UBIFS (ubi0:1): only R/O mounting is possible
[    8.218292] mount_root: failed to mount -t ubifs /dev/ubi0_1
/tmp/overlay: Read-only file system
[    9.190404] UBIFS error (ubi0:1 pid 782): ubifs_read_superblock:
on-flash format version is w5/r0, but software only supports up to
version w4/r0
[    9.203513] UBIFS (ubi0:1): only R/O mounting is possible
[    9.209281] mount_root: unable to set filesystem state
[    9.214465] mount_root: switching to ubifs overlay
[    9.219292] mount_root: switching to ubifs failed - fallback to
ramoverlay

This happens when doing a sysupgrade from kernel 4.14 to 4.9, so a
downgrade of the kernel.

It looks like we use the create_default_filesystem() function which
creates a file system with all the new features which is not compatible
with kernel 4.9 any more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ubifs/sb.c?id=fc4b891bbefa73b496bb44b076bb5274b6bfba68#n182

We could probably make this function create a file system which can also
be mounted on kernel 4.9 or do we just not want to support the case of
someone doing a sysupgrade to an older version on ubifs?

Hauke



More information about the Lede-dev mailing list