linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Anatolij Gustschin <agust@denx.de>
Cc: linux-mtd@lists.infradead.org, Detlev Zundel <dzu@denx.de>
Subject: Re: UBIFS partition on NOR flash not mountable after power cut test
Date: Thu, 02 Dec 2010 15:35:51 +0200	[thread overview]
Message-ID: <1291296951.2526.34.camel@localhost> (raw)
In-Reply-To: <20101202142351.197abbde@wker>

On Thu, 2010-12-02 at 14:23 +0100, Anatolij Gustschin wrote:
> On Thu, 02 Dec 2010 14:18:45 +0200
> Artem Bityutskiy <dedekind1@gmail.com> wrote:
> 
> > On Thu, 2010-12-02 at 10:57 +0100, Anatolij Gustschin wrote:
> > > UBIFS DBG (pid 1290): no_more_nodes: unexpected bad common header at 37:157472
> > > UBIFS error (pid 1290): ubifs_recover_leb: bad node
> > > UBIFS error (pid 1290): ubifs_scanned_corruption: corruption at LEB 37:157472
> > > UBIFS error (pid 1290): ubifs_scanned_corruption: first 8192 bytes from LEB 37:157472
> > > 00000000: 31181006 270758c8 0c331500 00000000 ffffffff ffffffff ff4fffff f3428020  1...'.X..3...............O...B. 
> > 
> > But this looks exactly like you have 64-bit write-buffer, but UBIFS
> > c->min_io_unit is not 64, but it should be 64. Or you need a NOR hack to
> > force 8-bytes write-buffer.
> 
> This looks exactly like I have a 16 byte write buffer. The first
> 16 bytes of the common header node have been written correctly but
> the remaining 8 bytes of the common header and then the 8 bytes of
> the data are corrupt.
> > 
> > Are you sure you did not miss your NOR write-buffer hacks?
> 
> I'm sure that the kernel running this test uses the modification in
> the CFI code as follows:
> diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
> index e63e674..9eb47b8 100644
> --- a/drivers/mtd/chips/cfi_probe.c
> +++ b/drivers/mtd/chips/cfi_probe.c
> @@ -213,6 +213,12 @@ static int __xipram cfi_chip_setup(struct map_info *map,
>         cfi->cfiq->InterfaceDesc = le16_to_cpu(cfi->cfiq->InterfaceDesc);
>         cfi->cfiq->MaxBufWriteSize = le16_to_cpu(cfi->cfiq->MaxBufWriteSize);
>  
> +       /*printk("NOTE: change CFI MaxBufWriteSize from 2^%d to 2^%d\n",*/
> +       /*cfi->cfiq->MaxBufWriteSize, 3);*/
> +       if (cfi->cfiq->MaxBufWriteSize) {
> +               cfi->cfiq->MaxBufWriteSize = 3;
> +       }
> +
> 
> But I'm not sure whether the CFI driver is really using 8 byte
> write buffer since the error pattern indicates the usage of a
> bigger buffer. I'll check the actual size used in the CFI driver
> at runtime.

Can you instead make mtd->writesize to be 64? This is much closer to the
"right thing to do" :-)

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2010-12-02 13:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 18:50 UBIFS partition on NOR flash not mountable after power cut test Anatolij Gustschin
2010-11-29 20:33 ` Mark Mason
2010-12-02  3:47   ` Artem Bityutskiy
2010-12-02  4:10     ` Mark Mason
2010-12-02  9:17       ` Detlev Zundel
2010-11-30 10:41 ` Norbert van Bolhuis
2010-11-30 15:35   ` Anatolij Gustschin
2010-12-01  9:38     ` Anatolij Gustschin
     [not found]     ` <AANLkTikEDQyNttTcKgHLwhR53sYSFbtVK-oy2S3END46@mail.gmail.com>
2010-12-01  9:47       ` Norbert van Bolhuis
2010-12-01  9:55       ` Anatolij Gustschin
     [not found]         ` <AANLkTikci0e2jaHCarA9HG86b_C-1UUcT_PMy-Q_mBrP@mail.gmail.com>
2010-12-01 13:06           ` Norbert van Bolhuis
2010-12-02  3:51   ` Artem Bityutskiy
2010-12-01 12:05 ` Anatolij Gustschin
2010-12-01 15:44   ` Anatolij Gustschin
2010-12-02  4:01     ` Artem Bityutskiy
2010-12-02  4:42     ` Artem Bityutskiy
2010-12-02  9:46       ` Matthieu CASTET
2010-12-02 12:18         ` Artem Bityutskiy
2010-12-02  9:57       ` Anatolij Gustschin
2010-12-02 12:18         ` Artem Bityutskiy
2010-12-02 13:23           ` Anatolij Gustschin
2010-12-02 13:35             ` Artem Bityutskiy [this message]
2010-12-02 13:50               ` Anatolij Gustschin
2010-12-02 13:57                 ` Artem Bityutskiy
2010-12-02 14:18                   ` Anatolij Gustschin
2010-12-03 10:07       ` Anatolij Gustschin
2010-12-03 10:23         ` Anatolij Gustschin
2010-12-03 10:28         ` Artem Bityutskiy
2010-12-03 10:41           ` Anatolij Gustschin
2010-12-03 10:49         ` Artem Bityutskiy
2010-12-03 11:15       ` Anatolij Gustschin
2010-12-02  3:46 ` 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=1291296951.2526.34.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=agust@denx.de \
    --cc=dzu@denx.de \
    --cc=linux-mtd@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).