All of lore.kernel.org
 help / color / mirror / Atom feed
* Regression in handling power cuts since 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up")
@ 2018-10-19 12:31 ` Rafał Miłecki
  0 siblings, 0 replies; 40+ messages in thread
From: Rafał Miłecki @ 2018-10-19 12:31 UTC (permalink / raw)
  To: Amir Goldstein, Miklos Szeredi, linux-unionfs, linux-fsdevel,
	Richard Weinberger, Artem Bityutskiy, Adrian Hunter, linux-mtd,
	Russell Senior, OpenWrt Development List

Hi,

Since OpenWrt switch from kernel 4.9 to 4.14 users started randomly
reporting file system corruptions. OpenWrt uses overlay(fs) with
squashfs as lowerdir and ubifs as upperdir. Russell managed to isolate
& describe test case for reproducing corruption when doing a power cut
after first boot.

Interestingly it cannot be reproduced on all devices (NAND dependant?
arch dependant?!). I couldn't reproduce that problem on none of my
Broadcom devices (ARM=y ARCH_BCM_5301X=y) so I had to buy Ubiquiti
EdgeRouter X (ER-X) (MIPS=y RALINK=y). I reproduced it then and
bisected down to the commit 3a1e819b4e80 ("ovl: store file handle of
lower inode on copy up").

FWIW I was told it also affects:
Asus RT-AC58U (ARCH_IPQ40XX=y)
powerpc
RB493G, DIR-860L (ATH79=y)

Steps to reproduce the problem:
1) Flash firmware
2) Boot (for the first time)
3) Let the init script copy config files from lowerdir to the upperdir
4) Wait for boot to finish
5) Verify content of some unmodified config on overlay, using either:
hexdump -C /etc/config/dropbear
hexdump -C /overlay/upper/etc/config/dropbear
6) Power cut & boot again
7) Check the content of the same file

After above regressing commit the later check confirms the file size
looks correct but it's filled with all 00-es only.

Can I ask you to check if there is something possibly wrong with the
above ovl commit? Or does it expose some problem with the ubifs? Or
maybe the whole UBI?

FWIW testing above commit (and one before it) always results in single
error in the kernel log:
[   14.250184] UBIFS error (ubi0:1 pid 637): ubifs_add_orphan: orphaned twice

That UBIFS error doesn't occur with 4.12.14. Unfortunately it's
impossible to cleanly revert 3a1e819b4e80 from the top of 4.12.14.

-- 
Rafał

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2018-10-28  7:09 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 12:31 Regression in handling power cuts since 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up") Rafał Miłecki
2018-10-19 12:31 ` Rafał Miłecki
2018-10-19 14:45 ` Richard Weinberger
2018-10-19 14:45   ` Richard Weinberger
2018-10-19 14:59   ` Richard Weinberger
2018-10-19 14:59   ` Richard Weinberger
2018-10-19 15:07     ` Amir Goldstein
2018-10-19 15:07     ` Amir Goldstein
2018-10-19 21:28     ` Rafał Miłecki
2018-10-19 21:28     ` Rafał Miłecki
2018-10-20  6:58       ` Richard Weinberger
2018-10-22  7:01         ` Rafał Miłecki
2018-10-22  7:01           ` Rafał Miłecki
2018-10-20  6:58       ` Richard Weinberger
2018-10-19 16:18   ` Rafał Miłecki
2018-10-19 16:18   ` Rafał Miłecki
2018-10-19 17:18     ` Richard Weinberger
2018-10-19 17:18       ` Richard Weinberger
2018-10-19 21:29       ` Rafał Miłecki
2018-10-19 21:29         ` Rafał Miłecki
2018-10-19 14:56 ` Amir Goldstein
2018-10-19 14:56   ` Amir Goldstein
2018-10-22  7:14 ` Rafał Miłecki
2018-10-22  7:14   ` Rafał Miłecki
2018-10-22  8:26   ` Richard Weinberger
2018-10-22  8:26     ` Richard Weinberger
2018-10-22  8:26     ` Richard Weinberger
2018-10-22  8:57     ` Amir Goldstein
2018-10-22  8:57       ` Amir Goldstein
2018-10-22 15:34       ` Rafał Miłecki
2018-10-22 15:34         ` Rafał Miłecki
2018-10-22 17:00         ` Amir Goldstein
2018-10-22 17:00         ` Amir Goldstein
2018-10-27 19:33         ` Richard Weinberger
2018-10-27 19:33           ` Richard Weinberger
2018-10-28  7:09           ` Russell Senior
2018-10-22 21:23     ` Rafał Miłecki
2018-10-22 21:23       ` Rafał Miłecki
2018-10-22 21:27     ` Rafał Miłecki
2018-10-22 21:27       ` Rafał Miłecki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.