Cam Mayor | 1 Oct 2003 01:19
Picon

MTD/JFFS2 bug - misreported filesystem usage

hi all,

I found a reproducable bug in the version of mtd/jffs2 that i have.  I'm 
using kernel 2.4.19-rmk7, and an MTD snapshot from March 25/2003.  My 'df' 
command comes from busybox version 0.60.5.

Bug: misreported filesystem usage

Procedure to reproduce:
1) boot system (this unlocks a NOR flash MTD area on which JFFS2 gets mounted)
2) 'df' to see filesystem usage
3) umount jffs2 partition
4) erase mtd partition which had jffs2 filesystem
5) mount jffs2 on newly erased partition
6) 'df' to see filesystem usage.
	"Used" and "Available" fields are switched; switch is reflected in the 
"Use%" field
7) write a file to JFFS2 filesystem
8) 'df' to see filesystem usage
	The filesystem usage is now reported accurately.

--

-- 
Cameron Mayor
Iders Incorporated

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

(Continue reading)

David Woodhouse | 1 Oct 2003 01:25
Favicon

Re: MTD/JFFS2 bug - misreported filesystem usage

On Tue, 2003-09-30 at 18:19 -0500, Cam Mayor wrote:

> 4) erase mtd partition which had jffs2 filesystem
> 5) mount jffs2 on newly erased partition
> 6) 'df' to see filesystem usage.
> 	"Used" and "Available" fields are switched; switch is reflected in the 
> "Use%" field

We make crap up in statfs().

In particular, we account erasing but not-yet-erased blocks as
unavailable, since the erase may fail. After mounting a newly-erased
device, JFFS2 sticks every single erase block on the list to be erased,
and that's why the space accounting goes haywire. It's not assuming that
any of those erases will succeed until such time as they actually do.

After mounting, just keep running 'df' and watching the free space
rise...

--

-- 
dwmw2

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

edward jose | 2 Oct 2003 08:54
Picon
Favicon

high cpu usage using nftl for DOC2000

hello,

i don't know if any one else experience this, i have a doc2000 with linux 
2.4.17 kernel compiled with mtd and doc modules. i use the kernel to boot 
the doc2000 everything is ok, but when i check the cpu load, it uses all the 
cpu.  this is the same when i use m-system's kernel module.

can someone explain to me why this happen?

thanks

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

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

Tim Gardner | 2 Oct 2003 21:44
Favicon
Tim Gardner <timg <at> tpi.com>

Subject: Patches to nanddump.c

Patches to nanddump.c

I've added a couple of options to nanddump.c:

-no-oob allowa you to retrieve the contents of a NAND character partiion 
without the OOB info. 

-no-print satisfies the interactive pretty-print request. 

See attached patch file.
--

-- 
Tim Gardner - timg <at> tpi.com 406-443-5357
TriplePoint, Inc. - http://www.tpi.com
PGP: http://www.tpi.com/PGP/Tim.txt
Attachment (mtd.diff.IceCube): text/x-diff, 2858 bytes
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Selwyn Tang | 3 Oct 2003 04:07

Re: high cpu usage using nftl for DOC2000

Hi Edward,

On 10/02/2003 02:54 PM, edward jose wrote:
> i don't know if any one else experience this, i have a doc2000 with linux 
> 2.4.17 kernel compiled with mtd and doc modules. i use the kernel to boot 
> the doc2000 everything is ok, but when i check the cpu load, it uses all the 

I experienced the same problem recently. I notice that whenever I try to
access the DOC, the process [nftla] starts to use up all the cpu time.
Right now I am suspecting that it is the problem with the filesystem on
the DOC. Sometimes, after running e2fsck on my ext2 partition on the
DOC, the problem just goes away. I have this problem both in 2.4.22 and
2.4.17, both patched with mtd snapshots of different dates. Therefore, I
 think it is a problem with the mtd driver.

Any ideas are appreciated.

Selwyn

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

David Woodhouse | 3 Oct 2003 07:54
Favicon

Re: high cpu usage using nftl for DOC2000

On Fri, 2003-10-03 at 10:07 +0800, Selwyn Tang wrote:
> Hi Edward,
> 
> On 10/02/2003 02:54 PM, edward jose wrote:
> > i don't know if any one else experience this, i have a doc2000 with linux 
> > 2.4.17 kernel compiled with mtd and doc modules. i use the kernel to boot 
> > the doc2000 everything is ok, but when i check the cpu load, it uses all the 
> 
> I experienced the same problem recently. I notice that whenever I try to
> access the DOC, the process [nftla] starts to use up all the cpu time.
> Right now I am suspecting that it is the problem with the filesystem on
> the DOC. Sometimes, after running e2fsck on my ext2 partition on the
> DOC, the problem just goes away. I have this problem both in 2.4.22 and
> 2.4.17, both patched with mtd snapshots of different dates. Therefore, I
>  think it is a problem with the mtd driver.

Boot with 'profile=1' and use readprofile to see where it's spending all
the CPU time. Note your driver must be built-in to the kernel for this.

--

-- 
dwmw2

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

Øyvind Harboe | 3 Oct 2003 09:48

Can I set JFFS2_RESERVED_BLOCKS_WRITE=0?

I've got a JFFS2 fs mounted with only a single sector.

In this application, there is a phase where JFFS2 is written to,
and afterwards it is protected in hardware and never changed again.

JFFS2 scores over a ROM fs, because a ROM fs is normally created
on the developer machine during compile time, whereas the JFFS2
fs can be laid out by the application in the field.

To my surprise, JFFS2 will refuse to write more files if there
are less than 5 secotors free.

Having no fear, I set JFFS2_RESERVED_BLOCKS_WRITE = 0.

Apparently this is to avoid "endless gc looping".

http://lists.infradead.org/pipermail/linux-mtd/2003-April/007437.html

If someone could shed some light on this, I would be much obliged.

Øyvind

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

Selwyn Tang | 3 Oct 2003 10:22

Re: high cpu usage using nftl for DOC2000

Hi Dave,

On 10/03/2003 01:54 PM, David Woodhouse wrote:
> Boot with 'profile=1' and use readprofile to see where it's spending all
> the CPU time. Note your driver must be built-in to the kernel for this.

The followings, among others, are reported by readprofile:

  147 handle_IRQ_event			1.5978
   17 ide_outb				1.4167
 3288 _DoC_Delay			32.8800
 6634 __rdtsc_delay			236.9286

I don't know how to interpret them :-)

Selwyn

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

David Woodhouse | 3 Oct 2003 10:52
Favicon

Re: high cpu usage using nftl for DOC2000

On Fri, 2003-10-03 at 16:22 +0800, Selwyn Tang wrote:
> The followings, among others, are reported by readprofile:
> 
>   147 handle_IRQ_event			1.5978
>    17 ide_outb				1.4167
>  3288 _DoC_Delay			32.8800
>  6634 __rdtsc_delay			236.9286
> 
> I don't know how to interpret them :-)

Run it through 'sort -n'. Ignore the third column; the first tells you
how many times, when a timer tick happened, we interrupted the function
named in the second column.

So on 147 occasions when the timer tick happened, the CPU was in
handle_IRQ_event(). During the period of this profiling run, we
(statistically speaking) spent about 1.47 seconds in that function.

We also spend 33 seconds in _DoC_Delay() and 66 seconds in
__rdtsc_delay(). It looks like the flash is very busy. Can you show me
the rest of the profile too?

Also, can you reset the profile counts (readprofile -r) and get a
reading from the time when it's doing this alone, rather than including
everything from boot onwards.

If it does it only sometimes, is there any pattern to when it starts or
stops?

--

-- 
(Continue reading)

Deepak Saxena | 3 Oct 2003 19:27

[PATCH] Remove hardcoded number of CFI chips


This is a resend of a patch originally posted by  Andrzej Mialkowski
from Intel a few months ago that removes the hardcoded MAX_CFI_CHIPS
and replaces it with a dynamic bitmap. I believe it got approved but never
checked in, but not 100% sure so I'm reposting it to see if it should
be pushed into CVS, cleaned up, or dropped.  I need this for several 
platforms with large numbers of chips, so I'd rather not see it just die.

Tnx,
~Deepak

Index: drivers/mtd/chips/cfi_probe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_probe.c,v
retrieving revision 1.72
diff -u -r1.72 cfi_probe.c
--- drivers/mtd/chips/cfi_probe.c	22 Jul 2003 13:23:38 -0000	1.72
+++ drivers/mtd/chips/cfi_probe.c	3 Oct 2003 17:13:00 -0000
 <at>  <at>  -26,7 +26,7  <at>  <at> 
 #endif

 static int cfi_probe_chip(struct map_info *map, __u32 base,
-			  struct flchip *chips, struct cfi_private *cfi);
+			  struct probe_info *probe, struct cfi_private *cfi);
 static int cfi_chip_setup(struct map_info *map, struct cfi_private *cfi);

 struct mtd_info *cfi_probe(struct map_info *map);
 <at>  <at>  -49,7 +49,7  <at>  <at> 
 }

(Continue reading)


Gmane