UBIFS Recovery Process on Power Cutoff
Zhihao Cheng
chengzhihao1 at huawei.com
Tue May 28 19:57:23 PDT 2024
在 2024/5/28 18:32, Mani K 写道:
> Hello,
>
> We have a system based on a Custom ARM SOC running on a Linux kernel
> with a UBIFS filesystem maintained on NOR flash. When the system power
> is cut off abruptly, we notice recovery-related messages when the
> filesystem is mounted. This recovery process takes additional boot
> time of 2-3 seconds.
>
> Here are the log messages we observe:
> [ 4.411551] ubi0: background thread "ubi_bgt0d" started, PID 586
> [ 7.191406] UBIFS (ubi0:0): Mounting in unauthenticated mode
> [ 7.197659] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 663
> [ 7.212730] UBIFS (ubi0:0): recovery needed
> [ 7.951546] UBIFS (ubi0:0): recovery completed
> [ 7.956280] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "app"
> [ 7.963620] UBIFS (ubi0:0): LEB size: 65408 bytes (63 KiB),
> min./max. I/O unit sizes: 8 bytes/256 bytes
> [ 7.973226] UBIFS (ubi0:0): FS size: 15828736 bytes (15 MiB, 242
> LEBs), journal size 2289280 bytes (2 MiB, 35 LEBs)
> [ 7.983874] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
> [ 7.989827] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0),
> UUID 00000000-0000-0008-0000-000000000001, small LPT model
>
> Is there any option to prevent the recovery process from happening?
>
UBIFS makes it be consistent again by replaying journal(recovery-related
messages. The aim of recovery is to update the metadata, otherwise the
userdata could be lost/corrupted for the stale metadata), the filesystem
image could become inconsistent if UBIFS skips the recovery, so I think
stopping recovery is not right.
More information about the linux-mtd
mailing list