ubifs: why ubifs doesn't support 2 copied of super blocks for better fs reliability
Zhihao Cheng
chengzhihao1 at huawei.com
Sat Jun 29 04:22:34 PDT 2024
在 2024/6/28 10:28, Ryder Wang 写道:
> Hello,
>
> It looks ubifs has only 1 super block. Super block may be corrupted by power-cut while NAND erasing or writing, ECC error and etc. When super block is corrupted, ubifs mount will always fail.
>
Have you met the problem caused by corrupted superblock? I only saw once
in our product, in which there ware many problem eraseblocks in the flash.
> I am asking why ubifs doesn't support 2 copied of super blocks for better fs reliability? As we know, both uibfs master block and ubi volume table have 2 copies, so they are very stronger. Is there any dev plan to support it on super block?
I have no ideas about this question either after looking through the
history and whitepaper[1]. The superblock is updated in a very low
frequency(eg. auto-resize), and it is updated by atomic changing. So I
guess that corrupted superblock is hardly generated from the view of
UBIFS layer. However, the UBI will do wear-leveing, which could
atomically exchange two LEBs(may contain superblock), then the updating
frequency of superblock could be increased. The final probability of
corrupted superblock is hard to say. So, I'm not sure it's a very
valuable thing to maintain two superblocks in UBIFS, afterall, it will
change disk structure.
[1] http://www.linux-mtd.infradead.org/doc/ubifs_whitepaper.pdf
>
> Best regards,
> Ryder
> .
>
More information about the linux-mtd
mailing list