[Yaffs] I: yaffs - file system on ARM

Nick Bane nick@cecomputing.co.uk
Tue, 5 Oct 2004 11:54:08 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_000B_01C4AAD2.056892D0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

I: yaffs - file system on ARM
  -----Original Message-----
  From: yaffs-admin@stoneboat.aleph1.co.uk
[mailto:yaffs-admin@stoneboat.aleph1.co.uk]On Behalf Of Pesce Gianfranco
  Sent: 05 October 2004 10:54
  To: 'yaffs@stoneboat.aleph1.co.uk'
  Subject: R: [Yaffs] I: yaffs - file system on ARM



      to Nick

  >Could you use plain text? It makes replying much easier.

  Sorry ,what does means plain text ?

You are emailing html intead of text. Some Windowsy client I guess. Note the
blue text and vertical blue bars. I have seen exchange server seem to add
html as a wrapper. There is a move to bounce all html emails by zealots.

  >what does /proc/yaffs say?

  this is the output of my /proc/yaffs

  # cat /proc/yaffs
  YAFFS built:Oct  5 2004 10:04:10
  $Id: yaffs_fs.c,v 1.32 2003/10/29 20:42:34 charles Exp $
  $Id: yaffs_guts.c,v 1.34 2004/06/08 08:47:55 charles Exp $

  Device yaffs
  startBlock......... 1
  endBlock........... 2174
  chunkGroupBits..... 1
  chunkGroupSize..... 2
  nErasedBlocks...... 6
  nTnodesCreated..... 0
  nFreeTnodes........ 0
  nObjectsCreated.... 100
  nFreeObjects....... 97
  nFreeChunks........ 192
  nPageWrites........ 0
  nPageReads......... 0
  nBlockErasures..... 0
  nGCCopies.......... 0
  garbageCollections. 0
  passiveGCs......... 0
  nRetriedWrites..... 0
  nRetireBlocks...... 0
  eccFixed........... 0
  eccUnfixed......... 0
  tagsEccFixed....... 0
  tagsEccUnfixed..... 6
  cacheHits.......... 0
  nDeletedFiles...... 0
  nUnlinkedFiles..... 0
  nBackgroudDeletions 0
  useNANDECC......... 1
  #

  >How big is the mtd partition in the boot messages?

  # cat /proc/mtd
  dev:    size   erasesize  name
  mtd0: 04000000 00004000 "BON"
  mtd1: 021fc000 00004000 "mtd"


2 mtd blocks. Are both yaffs? I am not clear which block /proc/yaffs is
referring to but it looks like /mtdblock/1 as 21fc000 bytes is 2175 16k
blocks. Is there data in the nand partition? Is it sane?

I have seem this before on systems which had a mismatch in the ecc encoding
or which had had a lot of erase/resumes.
My problem was a mismatch in the ecc calculations used to write the yaffs
image (using bootldr) to nans and that used by linux. Reading was fine,
writing was a mess.

You could enable mtd debugging and it should tell you where it finds pain.


      Thanks



    -----Messaggio originale-----
    Da: Nick Bane [mailto:nick@cecomputing.co.uk]
    Inviato: marted́ 5 ottobre 2004 11.31
    A: Pesce Gianfranco; yaffs@stoneboat.aleph1.co.uk
    Oggetto: RE: [Yaffs] I: yaffs - file system on ARM


    Pesce

    Could you use plain text? It makes replying much easier.

    what does /proc/yaffs say?
    If its all used it may be that it isn't all erased ot being accessed
correctly.
    How big is the mtd partition in the boot messages?

    Nick
      -----Original Message-----
      From: yaffs-admin@stoneboat.aleph1.co.uk
[mailto:yaffs-admin@stoneboat.aleph1.co.uk]On Behalf Of Pesce Gianfranco
      Sent: 05 October 2004 10:01
      To: 'yaffs@stoneboat.aleph1.co.uk'
      Subject: [Yaffs] I: yaffs - file system on ARM




              Sorry , more informations

              I am using a NAND flash Samsung K9D1208V0M

       -----Messaggio originale-----
      Da:     Pesce Gianfranco
      Inviato:        marted́ 5 ottobre 2004 10.56
      A:      'yaffs@stoneboat.aleph1.co.uk'
      Oggetto:        yaffs - file system on ARM





      Hi ,

      I am using an ARM machine with 2.4.18 kernel
      I want to use yaffs , the file system is mounted , but when I try to
do any operation , as mkdir or cp , I get the message

      "cannot allocate memory" and the command df says 100% used for
/dev/mtdblock/1

      Any help will be appreciated



      --------------------------------------------------------------
      GENERALE ELETTRONICA e AUTOMAZIONE S.r.l.
      Via Renata Bianchi 40 - 16152 GENOVA (ITALY)
      Tel.: +39 010 65966.1
      Fax: +39 010 65966.311
      http://www.gea-automotive.com;
      E-mail: mailbox@gea-automotive.com



      Ing. Gianfranco Pesce
      APPLICATION DEVELOPMENT DEPT.
      Project Engineer
      Tel. +39.010.659.66.507
      E-mail: pesceg@gea-automotive.com
      --------------------------------------------------------------



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.772 / Virus Database: 519 - Release Date: 01/10/2004

------=_NextPart_000_000B_01C4AAD2.056892D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>I: yaffs - file system on ARM</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
size=3D2>-----Original=20
  Message-----<BR><B>From:</B> yaffs-admin@stoneboat.aleph1.co.uk=20
  [mailto:yaffs-admin@stoneboat.aleph1.co.uk]<B>On Behalf Of </B>Pesce=20
  Gianfranco<BR><B>Sent:</B> 05 October 2004 10:54<BR><B>To:</B>=20
  'yaffs@stoneboat.aleph1.co.uk'<BR><B>Subject:</B> R: [Yaffs] I: yaffs =
- file=20
  system on ARM<BR><BR></FONT></DIV><SPAN =
class=3D130052009-05102004>&nbsp;=20
  <DIV><SPAN class=3D481532709-05102004><FONT size=3D2><SPAN=20
  class=3D130052009-05102004>&nbsp;&nbsp;&nbsp; to Nick&nbsp;=20
  </SPAN></FONT></SPAN></DIV>
  <DIV><SPAN class=3D481532709-05102004><FONT size=3D2><SPAN=20
  class=3D130052009-05102004></SPAN></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D481532709-05102004><FONT size=3D2><SPAN=20
  class=3D130052009-05102004>&gt;</SPAN>Could you use plain text? It =
makes=20
  replying much easier.</FONT></SPAN></DIV>
  <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT size=3D2>Sorry ,what does means plain text =
?</FONT></SPAN></DIV>
  <DIV><SPAN class=3D130052009-05102004><FONT=20
size=3D2></FONT></SPAN>&nbsp;</DIV></BLOCKQUOTE>
<DIV dir=3Dltr><SPAN class=3D130052009-05102004><SPAN =
class=3D152212110-05102004><FONT=20
face=3DArial color=3D#0000ff size=3D2>You are&nbsp;emailing&nbsp;html =
intead of text.=20
Some Windowsy client I guess. Note the blue&nbsp;text and vertical blue=20
bars.&nbsp;I have seen exchange server seem to add&nbsp;html as a =
wrapper. There=20
is a move to&nbsp;bounce all html emails by =
zealots.</FONT></SPAN></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV><SPAN class=3D130052009-05102004><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D130052009-05102004><FONT size=3D+0>
  <DIV><SPAN class=3D481532709-05102004><FONT size=3D2><SPAN=20
  class=3D130052009-05102004>&gt;</SPAN>what does /proc/yaffs say?=20
  </FONT></SPAN></DIV>
  <DIV><SPAN class=3D481532709-05102004><FONT=20
  size=3D2></FONT></SPAN>&nbsp;</DIV><FONT size=3D2>this is the output =
of my=20
  /proc/yaffs</FONT></FONT></SPAN></DIV>
  <DIV><SPAN class=3D130052009-05102004><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D130052009-05102004><FONT size=3D2># cat =
/proc/yaffs<BR>YAFFS=20
  built:Oct&nbsp; 5 2004 10:04:10<BR>$Id: yaffs_fs.c,v 1.32 2003/10/29 =
20:42:34=20
  charles Exp $<BR>$Id: yaffs_guts.c,v 1.34 2004/06/08 08:47:55 charles =
Exp=20
  $</FONT></SPAN></DIV>
  <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
  <DIV><SPAN class=3D130052009-05102004><FONT size=3D2>Device=20
  yaffs<BR>startBlock......... 1<BR>endBlock...........=20
  2174<BR>chunkGroupBits..... 1<BR>chunkGroupSize..... =
2<BR>nErasedBlocks......=20
  6<BR>nTnodesCreated..... 0<BR>nFreeTnodes........ =
0<BR>nObjectsCreated....=20
  100<BR>nFreeObjects....... 97<BR>nFreeChunks........=20
  192<BR>nPageWrites........ 0<BR>nPageReads......... =
0<BR>nBlockErasures.....=20
  0<BR>nGCCopies.......... 0<BR>garbageCollections. =
0<BR>passiveGCs.........=20
  0<BR>nRetriedWrites..... 0<BR>nRetireBlocks...... =
0<BR>eccFixed...........=20
  0<BR>eccUnfixed......... 0<BR>tagsEccFixed....... =
0<BR>tagsEccUnfixed.....=20
  6<BR>cacheHits.......... 0<BR>nDeletedFiles...... =
0<BR>nUnlinkedFiles.....=20
  0<BR>nBackgroudDeletions 0<BR>useNANDECC......... =
1<BR>#</FONT></SPAN></DIV>
  <DIV><SPAN class=3D130052009-05102004><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D130052009-05102004>
  <DIV><SPAN class=3D481532709-05102004><FONT size=3D2><SPAN=20
  class=3D130052009-05102004>&gt;</SPAN>How big is the mtd partition in =
the boot=20
  messages?</FONT></SPAN></DIV>
  <DIV><SPAN class=3D481532709-05102004><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D481532709-05102004><FONT size=3D2># cat=20
  /proc/mtd<BR>dev:&nbsp;&nbsp;&nbsp; size&nbsp;&nbsp; erasesize&nbsp;=20
  name<BR>mtd0: 04000000 00004000 "BON"<BR>mtd1: 021fc000 00004000=20
  "mtd"<BR></FONT></SPAN></DIV>
  <DIV><SPAN class=3D481532709-05102004><FONT size=3D2><FONT =
face=3DArial=20
  color=3D#0000ff></FONT></FONT></SPAN>&nbsp;</DIV></DIV></BLOCKQUOTE>
<DIV dir=3Dltr><SPAN class=3D481532709-05102004><FONT><SPAN=20
class=3D152212110-05102004><FONT face=3DArial color=3D#0000ff size=3D2>2 =
mtd blocks. Are=20
both yaffs? I am not clear which block /proc/yaffs is referring to but =
it looks=20
like /mtdblock/1 as 21fc000 bytes is 2175 16k blocks. Is there data in =
the nand=20
partition? Is it sane?</FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=3Dltr><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
size=3D2><SPAN =
class=3D152212110-05102004></SPAN></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr><SPAN class=3D481532709-05102004><FONT><SPAN=20
class=3D152212110-05102004><FONT face=3DArial color=3D#0000ff size=3D2>I =
have seem this=20
before on systems which had a mismatch in the ecc encoding or which had =
had a=20
lot of erase/resumes. </FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=3Dltr><SPAN class=3D481532709-05102004><FONT><SPAN=20
class=3D152212110-05102004><SPAN class=3D481532709-05102004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2><SPAN class=3D152212110-05102004>My problem was =
a mismatch in=20
the ecc calculations used to write the yaffs image (using bootldr) to =
nans and=20
that used by linux. Reading was fine, writing was a=20
mess.</SPAN></FONT></SPAN></DIV>
<DIV dir=3Dltr><FONT face=3DArial><FONT color=3D#0000ff><FONT =
size=3D2><SPAN=20
class=3D152212110-05102004>&nbsp;</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=3Dltr><FONT face=3DArial><FONT color=3D#0000ff><FONT =
size=3D2>You could enable=20
mtd debugging and it should tell you where it finds=20
pain.</FONT></FONT></FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=3Dltr><SPAN class=3D481532709-05102004><FONT><SPAN=20
class=3D152212110-05102004><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV><FONT size=3D2></FONT></FONT></SPAN>
  <DIV><SPAN class=3D481532709-05102004><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D481532709-05102004><SPAN =
class=3D130052009-05102004><FONT=20
  size=3D2>&nbsp;&nbsp;&nbsp; Thanks</FONT></SPAN></SPAN></DIV>
  <DIV><SPAN class=3D481532709-05102004><SPAN =
class=3D130052009-05102004><FONT=20
  size=3D2></FONT></SPAN></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D481532709-05102004><FONT=20
  size=3D2></FONT></SPAN>&nbsp;</DIV></SPAN></DIV>
  <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
  <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
    <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT=20
    size=3D2>-----Messaggio originale-----<BR><B>Da:</B> Nick Bane=20
    [mailto:nick@cecomputing.co.uk]<BR><B>Inviato:</B> marted=EC 5 =
ottobre 2004=20
    11.31<BR><B>A:</B> Pesce Gianfranco;=20
    yaffs@stoneboat.aleph1.co.uk<BR><B>Oggetto:</B> RE: [Yaffs] I: yaffs =
- file=20
    system on ARM<BR><BR></FONT></DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>Pesce</FONT></SPAN></DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>Could you use plain text? It makes replying much=20
    easier.</FONT></SPAN></DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>what does /proc/yaffs say? </FONT></SPAN></DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff size=3D2>If=20
    its all used it may be that it isn't all erased ot being accessed=20
    correctly.</FONT></SPAN></DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>How big is the mtd partition in the boot=20
messages?</FONT></SPAN></DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D481532709-05102004><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>Nick</FONT></SPAN></DIV>
    <BLOCKQUOTE=20
    style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff =
2px solid">
      <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
      size=3D2>-----Original Message-----<BR><B>From:</B>=20
      yaffs-admin@stoneboat.aleph1.co.uk=20
      [mailto:yaffs-admin@stoneboat.aleph1.co.uk]<B>On Behalf Of =
</B>Pesce=20
      Gianfranco<BR><B>Sent:</B> 05 October 2004 10:01<BR><B>To:</B>=20
      'yaffs@stoneboat.aleph1.co.uk'<BR><B>Subject:</B> [Yaffs] I: yaffs =
- file=20
      system on ARM<BR><BR></FONT></DIV><BR>
      <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=3DArial=20
      color=3D#0000ff size=3D2>Sorry , more informations</FONT> </P>
      <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=3DArial=20
      color=3D#0000ff size=3D2>I am using a NAND flash Samsung =
K9D1208V0M</FONT>=20
</P>
      <P><FONT face=3DArial></FONT>&nbsp;<FONT face=3DTahoma =
size=3D1>-----Messaggio=20
      originale-----</FONT> <BR><B><FONT face=3DTahoma size=3D1>Da:=20
      &nbsp;&nbsp;&nbsp;</FONT></B> <FONT face=3DTahoma size=3D1>Pesce=20
      Gianfranco&nbsp; </FONT><BR><B><FONT face=3DTahoma=20
      =
size=3D1>Inviato:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> =
<FONT=20
      face=3DTahoma size=3D1>marted=EC 5 ottobre 2004 10.56</FONT> =
<BR><B><FONT=20
      face=3DTahoma size=3D1>A:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> =
<FONT=20
      face=3DTahoma size=3D1>'yaffs@stoneboat.aleph1.co.uk'</FONT> =
<BR><B><FONT=20
      face=3DTahoma=20
      =
size=3D1>Oggetto:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></B> =
<FONT=20
      face=3DTahoma size=3D1>yaffs - file system on ARM</FONT> =
</P><BR><BR><BR>
      <P><FONT face=3DArial size=3D2>Hi ,</FONT> </P>
      <P><FONT face=3DArial size=3D2>I am using an ARM machine with =
2.4.18=20
      kernel</FONT> <BR><FONT face=3DArial size=3D2>I want to use yaffs =
, the file=20
      system is mounted , but when I try to do any operation , as mkdir =
or cp ,=20
      I get the message</FONT></P>
      <P><FONT face=3DArial size=3D2>"cannot allocate memory" and the =
command df=20
      says 100% used for /dev/mtdblock/1</FONT> </P>
      <P><FONT face=3DArial size=3D2>Any help will be appreciated</FONT> =
</P><BR>
      <P><FONT face=3DArial=20
      =
size=3D2>--------------------------------------------------------------</=
FONT><FONT=20
      face=3D"Times New Roman"> </FONT><BR><B><FONT face=3DArial =
color=3D#000000=20
      size=3D1>GENERALE ELETTRONICA e AUTOMAZIONE S.r.l.</FONT></B> =
<BR><FONT=20
      face=3DArial size=3D1>Via Renata Bianchi 40 - 16152 GENOVA =
(ITALY)</FONT>=20
      <BR><FONT face=3DArial size=3D1>Tel.: +39 010 65966.1</FONT> =
<BR><FONT=20
      face=3DArial size=3D1>Fax: +39 010 65966.311</FONT> <BR><U><FONT =
face=3DArial=20
      color=3D#0000ff size=3D1><A href=3D"http://www.gea-automotive.com" =

      target=3D_blank>http://www.gea-automotive.com</A></FONT></U><FONT =
face=3DArial=20
      size=3D1>;</FONT> <BR><FONT face=3DArial =
size=3D1>E-mail:</FONT><U> <FONT=20
      face=3DArial color=3D#0000ff =
size=3D1>mailbox@gea-automotive.com</FONT></U>=20
      </P><BR>
      <P><B><FONT face=3DArial size=3D2>Ing. Gianfranco Pesce</FONT></B> =

      <BR><I><FONT face=3DArial color=3D#ff00ff size=3D1>APPLICATION =
DEVELOPMENT=20
      DEPT.</FONT></I> <BR><FONT face=3DArial size=3D2>Project =
Engineer</FONT>=20
      <BR><FONT face=3DArial size=3D2>Tel. +39.010.659.66.507</FONT> =
<BR><FONT=20
      face=3DArial size=3D1>E-mail:</FONT><U></U><U> <FONT face=3DArial =
color=3D#0000ff=20
      size=3D2>pesceg@gea-automotive.com</FONT></U> <BR><FONT =
face=3DArial=20
      =
size=3D2>--------------------------------------------------------------</=
FONT>=20
      </P><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000B_01C4AAD2.056892D0--