UBIFS does not mount after powerfail

Richard Weinberger richard at nod.at
Mon Nov 13 13:06:37 PST 2017


Manfred,

Am Montag, 13. November 2017, 21:59:18 CET schrieb Manfred Spraul:
> On 11/12/2017 08:54 PM, Richard Weinberger wrote:
> > Manfred,
> > 
> > Am Sonntag, 12. November 2017, 20:26:38 CET schrieb Manfred Spraul:
> >> Hello together,
> >> 
> >> in a power fail stress test with ubifs, I ran into 5 images that do not
> >> mount:
> >> 
> >> 3x ubifs_check_node() fails, called by ubifs_garbage_collect_leb()
> >> 2x UBIFS assert failed in ubifs_rcvry_gc_commit at 1219 (pid 9570)
> >> (and ~550 images with just asserts, the mount was successful)
> >> 
> >> The test was done using kernel 4.14.0-rc5+ #105 SMP PREEMPT.
> >> The test involves create/rename/remove, using ecryptfs with xattr.
> >> 
> >> Are these known issues?
> > 
> > Nope.
> > This should not happen at all. ;-(
> > 
> >> Are there any patches that I should apply?
> > 
> > No, 4.14 is recent.
> > 
> >> What would you need to analyze them?
> > 
> > Can you retry without encryptfs and xattr?
> > xattrs had already some issues, maybe there are more.
> > Just as a start to know where to start digging.
> 
> I'll try to do that, but it will take a few days (the tests run at ~800
> power fails per hour)

Pretty high rate. :-)

> >> If you need the image (~32 MB), I'll try to find a suitable server.
> >> Below is the dmesg output from mounting the first bad image.
> > 
> > An image would be good but I need one with the 1st generation error.
> 
> What do you mean with 1st generation error?
> The image prior to the first mount after power fail? I have that.

No, the image that contains the first logical error.
UBIFS can mount even if there are many problems with the structure.
Therefore I need you to enable chk_fs. 

> And I found a server:
> 
> https://sourceforge.net/projects/calculix-rpm/files/ubifs/
> 
> image-168167.bin is the last image that mounts.
> then the next 5 images do not mount
> then the next image mounts again.
> The images are for mtdram, with the min write size set to 2048.
> 
> > Can you please make sure the the UBIFS debugfs knob "chk_fs" is set?
> > If set, UBIFS will check the whole filesystem while mounting.
> 
> Ok, I'll try that first - but it will take a few days as well.

Okay.

Thanks,
//richard




More information about the linux-mtd mailing list