From: Richard Weinberger <richard@nod.at>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBIFS does not mount after powerfail
Date: Tue, 28 Nov 2017 22:00:39 +0100 [thread overview]
Message-ID: <5256290.ff6uB8SQ02@blindfold> (raw)
In-Reply-To: <4b60c157-438f-4197-879c-f1a8b87cbdf8@colorfullife.com>
Manfred,
Am Donnerstag, 23. November 2017, 23:03:28 CET schrieb Manfred Spraul:
> Hi Richard,
>
> I have now three datasets:
> - no xattr, no FASTMAP:
> The log consists of ~189.000 WRITE or ERASE commands.
> -- with chk_fs: 30.000 images tested, all ok.
>
> -- with chk_fs, when splitting large writes at PAGE_SIZE: 814 images
> tested, all ok.
>
> --> no issues at all when not using xattr.
>
> - ecryptfs with ecryptfs_xattr_metadata:
> The log consists of ~188.000 WRITE or ERASE commands.
>
> -- without chk_fs: 23.000 images tested, 5 not mountable images, all 5
> within garbage_collect_leb():
>
> If I see it right, the root cause is always a node that crosses a page
> boundary:
> the first half of the node is written, the 2nd half is not written, it
> is still 0xff.
> These nodes cause CRC failures during scanning.
> (perhaps: output of layout_in_empty_space(), writing to a erased LEB
> instead of changing a LEB not properly handled?)
>
> -- with chk_fs: 795 images tested, 62 not mountable.
> Obviously including the 5 above: chk_fs runs after recovery_completed,
> garbage_collect_leb() is run during recovery.
>
> -- kill-orphaned-xattr, with chk_fs: 215 images tested, 156 not mountable.
> Note: This is not worse than without the patch. There are long streams
> of images that fail during chk_fs, 200 images is not enough for good
> statistics.
> And: I have not tested the same images as without the patch.
>
> - ecryptfs with ecryptfs_xattr_metadata and with FASTMAP
> The log consists of ~197.000 WRITE or ERASE commands.
>
> 21.000 images tested, 178 do not mount. all fail in chk_fs.
>
> The failure is always something like this:
> > [34802.217857] UBIFS error (ubi0:0 pid 25706): ubifs_read_node: bad
> > node at LEB 243:74672, LEB mapping status 0
> > [34802.218965] Not a node, first 24 bytes:
> > [34802.218969] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> > ff ff ff ff
>
> I have not tested with chk_fastmap.
> And: Unlike above, where I tested the last images, I have here tested
> the first 20k images, thus a more or less empty media.
> The lower failure rate could be caused by that.
>
> Did you have the time to look at the images?
> If you need more images, or if I should test a patch, just ask.
I tied, but TBH I'm completely lost in all the data you throwing on me.
Let's recap, you trigger a corruption that happens only(!) when xattrs are
used?
How is Fastmap involved in the game? If so, I want to know whether you can
trigger without Fastmap being enabled.
Which one is the image that failed first with chk_fs enabled?
On a vanilla kernel...
How did you save that image? I'd like to use it in my simulator too
Make sure to not store OOB data.
Thanks,
//richard
next prev parent reply other threads:[~2017-11-28 21:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-12 19:26 UBIFS does not mount after powerfail Manfred Spraul
2017-11-12 19:54 ` Richard Weinberger
2017-11-13 20:59 ` Manfred Spraul
2017-11-13 21:06 ` Richard Weinberger
2017-11-14 18:49 ` Manfred Spraul
2017-11-15 20:04 ` Manfred Spraul
2017-11-15 20:29 ` Richard Weinberger
2017-11-16 16:51 ` Manfred Spraul
2017-11-19 20:52 ` Richard Weinberger
2017-11-23 22:03 ` Manfred Spraul
2017-11-28 21:00 ` Richard Weinberger [this message]
2017-11-30 17:41 ` Manfred Spraul
2017-11-30 20:03 ` Richard Weinberger
2017-12-01 7:41 ` Manfred Spraul
2017-12-01 10:01 ` Richard Weinberger
2017-12-01 17:38 ` Manfred Spraul
2017-12-05 13:27 ` Richard Weinberger
2017-12-05 19:11 ` Manfred Spraul
2017-12-05 20:06 ` Richard Weinberger
2017-12-05 22:19 ` Richard Weinberger
2017-12-06 18:42 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5256290.ff6uB8SQ02@blindfold \
--to=richard@nod.at \
--cc=linux-mtd@lists.infradead.org \
--cc=manfred@colorfullife.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox