All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: "Eric Holmberg" <Eric_Holmberg@trimble.com>
Cc: Jamie Lokier <jamie@shareable.org>,
	Adrian Hunter <adrian.hunter@nokia.com>,
	linux-mtd@lists.infradead.org, Urs Muff <urs_muff@trimble.com>
Subject: Re: UBIFS Corrupt during power failure
Date: Fri, 15 May 2009 09:16:53 +0200	[thread overview]
Message-ID: <200905150916.54091.sr@denx.de> (raw)
In-Reply-To: <C77C279BA71FD14985DC8E75FB265AB7030C4C86@usw-am-xch-02.am.trimblecorp.net>

Hi Eric,

On Saturday 18 April 2009 01:49:52 Eric Holmberg wrote:
> > Yeah, let's wait for Eric's results and then will work on
> > extending MTD device model with this parameter.
>
> As suggested, I patched my 2.6.27 kernel with the latest from
> http://git.infradead.org/users/dedekind/ubifs-v2.6.27.git (includes all
> updates up to and including fhe fix-recovery bug,
> http://git.infradead.org/users/dedekind/ubifs-v2.6.27.git?a=commit;h=e14
> 4c1c037f1c6f7c687de5a2cd375cb40dfe71e).
>
> I have the unit running with a maximum write buffer of 8 bytes (the NOR
> flash chip is capable of 64 bytes).

How exactly did you do this? In cfi_cmdset_0002.c?

> I was seeing 4 different failure scenarios with the base 2.6.27 code,
> but now I am only seeing one remaining failure after 30+ hours of power
> cycling.  I added a stack dump this afternoon that will let me pinpoint
> exactly what is happening, but haven't seen the failure, yet.
>
> The failure happens when I get two corrupt empty LEB's.  I believe the
> scenario is that an erase is interrupted and on the next boot, while the
> file system is being recovered, another power failure occurs.
>
> I can erase one of the LEB's manually in U-Boot and the file system
> recovers properly.
>
> I'm going to leave the units running over the weekend and see what is
> waiting for me Monday morning.

Do you have an update for this? What's the current status on your system now? 
Which patches did you apply to work reliably with the Spansion FLASH?

I'm asking since we are seeing a similar issue on one of our boards equipped 
with the S29GL512P. This simple script triggers problems upon the next mount:

---
mount -t ubifs ubi0:testvolume /mnt
sync
reboot -n -f
---

The next mount will result most of the time in this:

UBIFS: recovery needed
UBIFS error (pid 406): ubifs_scan: corrupt empty space at LEB 3:130320
UBIFS error (pid 406): ubifs_scanned_corruption: corrupted data at LEB 
3:130320
UBIFS error (pid 406): ubifs_scan: LEB 3 scanning failed
UBIFS error (pid 406): ubifs_recover_leb: corrupt empty space at LEB 3:32
UBIFS error (pid 406): ubifs_scanned_corruption: corrupted data at LEB 3:32
UBIFS error (pid 406): ubifs_recover_leb: LEB 3 scanning failed
mount: Structure needs cleaning

This is without the patch from this thread included (in recovery.c). With this 
patch included the recovery is successful all the time, as far as we can see 
right now. But I'm wondering if we really need to disable the write buffer in 
the CFI driver or reduce the write buffer to 8.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office@denx.de
=====================================================================

  reply	other threads:[~2009-05-15  7:16 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 13:45 UBIFS Corrupt during power failure Eric Holmberg
2009-03-24 15:30 ` Adrian Hunter
2009-03-24 17:04   ` Eric Holmberg
2009-03-24 18:16     ` Eric Holmberg
2009-03-25  6:32     ` Artem Bityutskiy
2009-03-26  6:59     ` Artem Bityutskiy
2009-03-26 14:09       ` Eric Holmberg
2009-03-30 19:00         ` Eric Holmberg
2009-03-31 14:45           ` Artem Bityutskiy
2009-04-10 12:25           ` Artem Bityutskiy
2009-04-10 14:27             ` Eric Holmberg
2009-04-10 15:17               ` Artem Bityutskiy
2009-04-10 15:49                 ` Artem Bityutskiy
2009-04-10 17:00                   ` Eric Holmberg
2009-04-10 17:11                     ` Artem Bityutskiy
2009-04-10 18:33                       ` Eric Holmberg
2009-04-14  6:11                         ` Artem Bityutskiy
2009-04-14 15:09                           ` Eric Holmberg
2009-04-14 15:45                             ` Artem Bityutskiy
2009-04-14 15:53                               ` Artem Bityutskiy
2009-04-14 18:00                           ` Jamie Lokier
2009-04-15  6:00                             ` Artem Bityutskiy
2009-04-15 15:17                               ` Eric Holmberg
2009-04-15 16:09                                 ` Jamie Lokier
2009-04-15 16:12                                   ` Artem Bityutskiy
2009-04-15 16:32                                   ` Eric Holmberg
2009-04-15 16:44                                     ` Jamie Lokier
2009-04-15 18:26                                       ` Nicolas Pitre
2009-04-15 18:38                                         ` Jamie Lokier
2009-04-15 19:33                                           ` Eric Holmberg
2009-04-15 20:15                                             ` Nicolas Pitre
2009-04-15 20:46                                               ` Jamie Lokier
2009-04-16  5:51                                             ` Artem Bityutskiy
2009-04-16  5:46                                     ` Artem Bityutskiy
2009-04-16 21:34                                       ` Jamie Lokier
2009-04-17  8:56                                         ` Artem Bityutskiy
2009-04-17 13:51                                           ` Jamie Lokier
2009-04-17 14:36                                             ` Artem Bityutskiy
2009-04-17 23:49                                               ` Eric Holmberg
2009-05-15  7:16                                                 ` Stefan Roese [this message]
2009-05-18 17:30                                                   ` Eric Holmberg
2009-05-19  8:18                                                     ` Artem Bityutskiy
2009-05-19 22:16                                                       ` Eric Holmberg
2009-05-25  8:38                                                         ` Artem Bityutskiy
2009-05-25 12:54                                                           ` Artem Bityutskiy
2009-05-25 12:57                                                             ` Artem Bityutskiy
2009-07-03 13:26                                                         ` Artem Bityutskiy
2009-07-03 13:29                                                           ` Artem Bityutskiy
2009-07-03 13:33                                                             ` Urs Muff
2009-07-03 14:05                                                               ` Artem Bityutskiy
2009-07-03 14:47                                                                 ` Urs Muff
2009-07-03 14:58                                                                   ` Artem Bityutskiy
2009-07-06  4:30                                                                     ` Artem Bityutskiy
2009-07-06  4:51                                                                       ` Artem Bityutskiy
2009-07-06  6:43                                                                         ` Artem Bityutskiy
2009-07-07  6:46                                                                           ` Artem Bityutskiy
2009-07-07  7:05                                                                             ` Urs Muff
2009-07-13 18:22                                                                             ` Eric Holmberg
2009-07-14  5:34                                                                               ` Artem Bityutskiy
2009-07-15 20:52                                                                               ` Jamie Lokier
2009-07-15 21:35                                                                                 ` Eric Holmberg
2009-07-16  7:33                                                                                   ` Artem Bityutskiy
2009-07-24  6:49                                                                                   ` Artem Bityutskiy
2009-07-24 12:00                                                                                     ` Artem Bityutskiy
2009-07-24 13:39                                                                                       ` Eric Holmberg
2009-07-24 14:55                                                                                         ` Artem Bityutskiy
2009-07-24 14:05                                                                                     ` Jamie Lokier
2009-07-24 14:09                                                                                       ` Artem Bityutskiy
2009-07-16  7:09                                                                                 ` Artem Bityutskiy
2009-07-16 16:49                                                                                   ` Jamie Lokier
2009-07-17  7:07                                                                                     ` Artem Bityutskiy
2009-07-15 20:55                                                                       ` Jamie Lokier
2009-07-15 21:36                                                                         ` Eric Holmberg
2009-07-15 22:09                                                                           ` Jamie Lokier
2009-07-16  7:22                                                                             ` Artem Bityutskiy
2009-07-16  7:16                                                                           ` Artem Bityutskiy
2009-07-16 20:54                                                                             ` Gilles Casse
2009-07-17  0:29                                                                               ` Carl-Daniel Hailfinger
2009-07-24 14:08                                                                                 ` Jamie Lokier
2009-07-16  7:14                                                                         ` Artem Bityutskiy
2009-06-03  8:08                                                   ` Artem Bityutskiy
2009-06-03  8:25                                                     ` Stefan Roese
2009-06-03 13:50                                                     ` Eric Holmberg
2009-06-07 10:16                                                       ` Artem Bityutskiy
2009-07-28 12:01                                                         ` news
2009-07-28 12:24                                                           ` Adrian Hunter
2009-07-28 17:19                                                           ` Eric Holmberg
2009-08-09  4:59                                                           ` Artem Bityutskiy
2009-04-17  8:58                                         ` Artem Bityutskiy

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=200905150916.54091.sr@denx.de \
    --to=sr@denx.de \
    --cc=Eric_Holmberg@trimble.com \
    --cc=adrian.hunter@nokia.com \
    --cc=jamie@shareable.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=urs_muff@trimble.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 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.