public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* No space left on almost empty JFFS2 filesystem
@ 2003-06-25 15:48 Paul van Gool
  2003-06-25 15:52 ` Jasmine Strong
  0 siblings, 1 reply; 12+ messages in thread
From: Paul van Gool @ 2003-06-25 15:48 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have created an small and almost empty JFFS2 filesystem and have put it
on my flash. The image is padded to 128K and there should be space left.
When I mount it though the filesystem shows up as full. Any hints where to
look?

I created the image with:

mkfs.jffs2 --pad --little-endian --squash -e 0x20000 -d /home/vangool/jffs -o jffs.img

/home/vangool/jffs contains:

[vangool@sb-lnx3 vangool]$ ls -l /home/vangool/jffs
total 16
-rwxr-xr-x    1 vangool  develop     11769 Jun 25 07:49 hello
-rw-r--r--    1 vangool  develop       158 Jun 25 07:49 hello.c

When I mount it on my dev board I see:

# mount -t jffs2  /dev/mtdblock4 /mnt/jffs                                      
mtdblock_open                                                                   
ok                                                                              
# df                                                                              
Filesystem           1k-blocks      Used Available Use% Mounted on              
rootfs                    7931      3682      4249  46% /                       
/dev/root                 7931      3682      4249  46% /                       
10.0.2.11:/           74730396   3471336  67462904   5% /mnt/camb-lnx1          
10.0.2.12:/           74754492   5980872  64976256   8% /mnt/camb-lnx2          
/dev/mtdblock4             128       128         0 100% /mnt/jffs

And as a result:

# /mnt/jffs/hello > /mnt/jffs/hello.out                                         
cannot create /mnt/jffs/hello.out: No space left on device                      

In case it's important, I flashed the image using Redboot:

load -r -v -b 0x8F000000 camb-devbrd1/jffs.img -m TFTP -h 10.0.2.12
fis create jffs -f 0x80300000 -l 0x20000 -b 0x8F000000 -r 0x8F000000

Thanks in advance.

Paul
-- 
Paul van Gool                                               Rincon Networks
paul.vangool@rinconnetworks.com                              (805)-705-1442

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 15:48 No space left on almost empty JFFS2 filesystem Paul van Gool
@ 2003-06-25 15:52 ` Jasmine Strong
  2003-06-25 15:58   ` Paul van Gool
  2003-06-25 16:04   ` Jörn Engel
  0 siblings, 2 replies; 12+ messages in thread
From: Jasmine Strong @ 2003-06-25 15:52 UTC (permalink / raw)
  To: paul.vangool; +Cc: linux-mtd


On Wednesday, Jun 25, 2003, at 16:48 Europe/London, Paul van Gool wrote:

> Hi,
>
> I have created an small and almost empty JFFS2 filesystem and have put 
> it
> on my flash.

JFFS2 filesystems require a certain number of erase blocks reserved for
garbage collection before you can write anything to them.

128k is only one erase block for most CFI flashes and is thus far too 
small
to have the five(?) free blocks that are required.  There was talk of 
proving
the GC for two free blocks, but either way, one block is not (and never 
will
be) enough.

-Jas.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 15:52 ` Jasmine Strong
@ 2003-06-25 15:58   ` Paul van Gool
  2003-06-25 18:20     ` Paul van Gool
  2003-06-25 16:04   ` Jörn Engel
  1 sibling, 1 reply; 12+ messages in thread
From: Paul van Gool @ 2003-06-25 15:58 UTC (permalink / raw)
  To: Jasmine Strong; +Cc: linux-mtd

On Wed, Jun 25, 2003 at 04:52:34PM +0100, Jasmine Strong wrote:
> JFFS2 filesystems require a certain number of erase blocks reserved for
> garbage collection before you can write anything to them.
I see. 1 Block will indeed never be enough then. Shows my ignorance ;-).

Thanks.

Paul 
-- 
Paul van Gool                                               Rincon Networks
paul.vangool@rinconnetworks.com                              (805)-705-1442

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 15:52 ` Jasmine Strong
  2003-06-25 15:58   ` Paul van Gool
@ 2003-06-25 16:04   ` Jörn Engel
  1 sibling, 0 replies; 12+ messages in thread
From: Jörn Engel @ 2003-06-25 16:04 UTC (permalink / raw)
  To: Jasmine Strong; +Cc: linux-mtd

On Wed, 25 June 2003 16:52:34 +0100, Jasmine Strong wrote:
> On Wednesday, Jun 25, 2003, at 16:48 Europe/London, Paul van Gool wrote:
> 
> >I have created an small and almost empty JFFS2 filesystem and have put 
> >it
> >on my flash.
> 
> JFFS2 filesystems require a certain number of erase blocks reserved for
> garbage collection before you can write anything to them.
> 
> 128k is only one erase block for most CFI flashes and is thus far too 
> small
> to have the five(?) free blocks that are required.  There was talk of 
> proving
> the GC for two free blocks, but either way, one block is not (and never 
> will
> be) enough.

Two blocks will be tough, but three seem possible for NOR flash.  If
you care about it, there was some discussion a couple of month back,
even an initial patch.  But then priorities shifted, so that is the
latest status.

Jörn

-- 
Ninety percent of everything is crap.
-- Sturgeon's Law

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 15:58   ` Paul van Gool
@ 2003-06-25 18:20     ` Paul van Gool
  2003-06-25 18:24       ` Paul van Gool
  0 siblings, 1 reply; 12+ messages in thread
From: Paul van Gool @ 2003-06-25 18:20 UTC (permalink / raw)
  To: Jasmine Strong; +Cc: linux-mtd

So I tried:

mkfs.jffs2 --pad=0x80000 --little-endian --squash -e 0x20000 -d /home/vangool/jffs -o jffs.img

thinking that that would give me 3 erase blocks but I still get the
same error. Am I doing something wrong?

Thanks.

Paul


On Wed, Jun 25, 2003 at 08:58:46AM -0700, Paul van Gool wrote:
> On Wed, Jun 25, 2003 at 04:52:34PM +0100, Jasmine Strong wrote:
> > JFFS2 filesystems require a certain number of erase blocks reserved for
> > garbage collection before you can write anything to them.
> I see. 1 Block will indeed never be enough then. Shows my ignorance ;-).
> 
> Thanks.
> 
> Paul 
> -- 
> Paul van Gool                                               Rincon Networks
> paul.vangool@rinconnetworks.com                              (805)-705-1442
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

-- 
Paul van Gool                                               Rincon Networks
paul.vangool@rinconnetworks.com                              (805)-705-1442

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 18:20     ` Paul van Gool
@ 2003-06-25 18:24       ` Paul van Gool
  2003-06-25 18:29         ` Jasmine Strong
  2003-06-25 19:52         ` Thomas Gleixner
  0 siblings, 2 replies; 12+ messages in thread
From: Paul van Gool @ 2003-06-25 18:24 UTC (permalink / raw)
  To: Jasmine Strong; +Cc: linux-mtd

Creating am image with '-e 0x10000' and running with it, results in:

# mount -t jffs2 /dev/mtdblock4 /mnt/jffs                                       
mtdblock_open                                                                   
ok                                                                              
jffs2_scan_empty(): Empty block at 0x000017ac ends at 0x00010000 (with 0x200319y
CLEANMARKER node found at 0x00010000, not first node in block (0x00000000)      
jffs2_scan_empty(): Empty block at 0x0002000c ends at 0x00030000 (with 0x200319y
CLEANMARKER node found at 0x00030000, not first node in block (0x00020000)      
jffs2_scan_empty(): Empty block at 0x0004000c ends at 0x00050000 (with 0x200319y
CLEANMARKER node found at 0x00050000, not first node in block (0x00040000)      
jffs2_scan_empty(): Empty block at 0x0006000c ends at 0x00070000 (with 0x200319y
CLEANMARKER node found at 0x00070000, not first node in block (0x00060000)      
jffs2: No clean _or_ dirty blocks to GC from! Where are they all?               
jffs2: Couldn't find erase block to garbage collect!                            
jffs2: No clean _or_ dirty blocks to GC from! Where are they all?               
jffs2: Couldn't find erase block to garbage collect!                            
jffs2: No clean _or_ dirty blocks to GC from! Where are they all?               
jffs2: Couldn't find erase block to garbage collect!
...

Paul

On Wed, Jun 25, 2003 at 11:20:20AM -0700, Paul van Gool wrote:
> So I tried:
> 
> mkfs.jffs2 --pad=0x80000 --little-endian --squash -e 0x20000 -d /home/vangool/jffs -o jffs.img
> 
> thinking that that would give me 3 erase blocks but I still get the
> same error. Am I doing something wrong?
> 
> Thanks.
> 
> Paul
> 
> 
> On Wed, Jun 25, 2003 at 08:58:46AM -0700, Paul van Gool wrote:
> > On Wed, Jun 25, 2003 at 04:52:34PM +0100, Jasmine Strong wrote:
> > > JFFS2 filesystems require a certain number of erase blocks reserved for
> > > garbage collection before you can write anything to them.
> > I see. 1 Block will indeed never be enough then. Shows my ignorance ;-).
> > 
> > Thanks.
> > 
> > Paul 
> > -- 
> > Paul van Gool                                               Rincon Networks
> > paul.vangool@rinconnetworks.com                              (805)-705-1442
> > 
> > ______________________________________________________
> > Linux MTD discussion mailing list
> > http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> -- 
> Paul van Gool                                               Rincon Networks
> paul.vangool@rinconnetworks.com                              (805)-705-1442

-- 
Paul van Gool                                               Rincon Networks
paul.vangool@rinconnetworks.com                              (805)-705-1442

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 18:24       ` Paul van Gool
@ 2003-06-25 18:29         ` Jasmine Strong
  2003-06-25 18:49           ` Jörn Engel
  2003-06-25 19:52         ` Thomas Gleixner
  1 sibling, 1 reply; 12+ messages in thread
From: Jasmine Strong @ 2003-06-25 18:29 UTC (permalink / raw)
  To: paul.vangool; +Cc: linux-mtd


On Wednesday, Jun 25, 2003, at 19:24 Europe/London, Paul van Gool wrote:

> Creating am image with '-e 0x10000' and running with it, results in:
> [snip]

Did you erase the flash properly?  It looks like it's got messed up 
somehow.

Re- the other point.  You need, afaik, to have at least five empty 
erase blocks
before jffs2 will try to write to the flash.  This is, yes, half a 
mibibit.

Unless this has changed, Jörn?

-J.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 18:29         ` Jasmine Strong
@ 2003-06-25 18:49           ` Jörn Engel
  2003-06-25 19:44             ` Paul van Gool
  0 siblings, 1 reply; 12+ messages in thread
From: Jörn Engel @ 2003-06-25 18:49 UTC (permalink / raw)
  To: Jasmine Strong; +Cc: linux-mtd

On Wed, 25 June 2003 19:29:54 +0100, Jasmine Strong wrote:
> On Wednesday, Jun 25, 2003, at 19:24 Europe/London, Paul van Gool wrote:
> 
> >Creating am image with '-e 0x10000' and running with it, results in:
> >[snip]
> 
> Did you erase the flash properly?  It looks like it's got messed up 
> somehow.
> 
> Re- the other point.  You need, afaik, to have at least five empty 
> erase blocks
> before jffs2 will try to write to the flash.  This is, yes, half a 
> mibibit.
> 
> Unless this has changed, Jörn?

No, it hasn't.  The changes were started, but never finished.

Jörn

-- 
With a PC, I always felt limited by the software available. On Unix, 
I am limited only by my knowledge.
-- Peter J. Schoenster

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 19:52         ` Thomas Gleixner
@ 2003-06-25 19:43           ` Paul van Gool
  0 siblings, 0 replies; 12+ messages in thread
From: Paul van Gool @ 2003-06-25 19:43 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mtd, Jasmine Strong

On Wed, Jun 25, 2003 at 09:52:25PM +0200, Thomas Gleixner wrote:
> You can only erase eraseblocks and not a quarter of them, as you can't buy a 
> 1/4 of a beerbottle. You can fill the bottle with 1/4 of the maximum content, 
> but the bottle still remains the same size. :)
I thought I would try and see what happened during the mount. I hoped it would
give me more data about whas was going on.

Thanks.

Paul
-- 
Paul van Gool                                               Rincon Networks
paul.vangool@rinconnetworks.com                              (805)-705-1442

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 18:49           ` Jörn Engel
@ 2003-06-25 19:44             ` Paul van Gool
  2003-06-25 20:03               ` Paul van Gool
  0 siblings, 1 reply; 12+ messages in thread
From: Paul van Gool @ 2003-06-25 19:44 UTC (permalink / raw)
  To: Jörn Engel; +Cc: linux-mtd, Jasmine Strong

Jörn and Jasmine,

thanks for the feedback. I'll give it a try.

Paul

On Wed, Jun 25, 2003 at 08:49:33PM +0200, Jörn Engel wrote:
> On Wed, 25 June 2003 19:29:54 +0100, Jasmine Strong wrote:
> > On Wednesday, Jun 25, 2003, at 19:24 Europe/London, Paul van Gool wrote:
> > 
> > >Creating am image with '-e 0x10000' and running with it, results in:
> > >[snip]
> > 
> > Did you erase the flash properly?  It looks like it's got messed up 
> > somehow.
> > 
> > Re- the other point.  You need, afaik, to have at least five empty 
> > erase blocks
> > before jffs2 will try to write to the flash.  This is, yes, half a 
> > mibibit.
> > 
> > Unless this has changed, Jörn?
> 
> No, it hasn't.  The changes were started, but never finished.
> 
> Jörn
> 
> -- 
> With a PC, I always felt limited by the software available. On Unix, 
> I am limited only by my knowledge.
> -- Peter J. Schoenster

-- 
Paul van Gool                                               Rincon Networks
paul.vangool@rinconnetworks.com                              (805)-705-1442

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 18:24       ` Paul van Gool
  2003-06-25 18:29         ` Jasmine Strong
@ 2003-06-25 19:52         ` Thomas Gleixner
  2003-06-25 19:43           ` Paul van Gool
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Gleixner @ 2003-06-25 19:52 UTC (permalink / raw)
  To: paul.vangool, Jasmine Strong; +Cc: linux-mtd

On Wednesday 25 June 2003 20:24, Paul van Gool wrote:
> Creating am image with '-e 0x10000' and running with it, results in:
>
> # mount -t jffs2 /dev/mtdblock4 /mnt/jffs
> mtdblock_open
> ok
> jffs2_scan_empty(): Empty block at 0x000017ac ends at 0x00010000 (with
> 0x200319y CLEANMARKER node found at 0x00010000, not first node in block
> (0x00000000) jffs2_scan_empty(): Empty block at 0x0002000c ends at
> 0x00030000 (with 0x200319y CLEANMARKER node found at 0x00030000, not first
> node in block (0x00020000) jffs2_scan_empty(): Empty block at 0x0004000c
> ends at 0x00050000 (with 0x200319y CLEANMARKER node found at 0x00050000,
> not first node in block (0x00040000) jffs2_scan_empty(): Empty block at
> 0x0006000c ends at 0x00070000 (with 0x200319y CLEANMARKER node found at
> 0x00070000, not first node in block (0x00060000) jffs2: No clean _or_ dirty
> blocks to GC from! Where are they all?
> jffs2: Couldn't find erase block to garbage collect!
> jffs2: No clean _or_ dirty blocks to GC from! Where are they all?
> jffs2: Couldn't find erase block to garbage collect!
> jffs2: No clean _or_ dirty blocks to GC from! Where are they all?
> jffs2: Couldn't find erase block to garbage collect!
Don't try to betray the pyhsiccal facts. Even if you tell mkfs.jffs2 that your 
eraseblock size is < 128K,  the physical eraseblock size will remain at 128K, 
as this is given by the chip. 

You can only erase eraseblocks and not a quarter of them, as you can't buy a 
1/4 of a beerbottle. You can fill the bottle with 1/4 of the maximum content, 
but the bottle still remains the same size. :)

-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: No space left on almost empty JFFS2 filesystem
  2003-06-25 19:44             ` Paul van Gool
@ 2003-06-25 20:03               ` Paul van Gool
  0 siblings, 0 replies; 12+ messages in thread
From: Paul van Gool @ 2003-06-25 20:03 UTC (permalink / raw)
  To: Jörn Engel; +Cc: linux-mtd, Jasmine Strong

That worked. Thanks.

Paul

On Wed, Jun 25, 2003 at 12:44:21PM -0700, Paul van Gool wrote:
> Jörn and Jasmine,
> 
> thanks for the feedback. I'll give it a try.
> 
> Paul
> 
> On Wed, Jun 25, 2003 at 08:49:33PM +0200, Jörn Engel wrote:
> > On Wed, 25 June 2003 19:29:54 +0100, Jasmine Strong wrote:
> > > On Wednesday, Jun 25, 2003, at 19:24 Europe/London, Paul van Gool wrote:
> > > 
> > > >Creating am image with '-e 0x10000' and running with it, results in:
> > > >[snip]
> > > 
> > > Did you erase the flash properly?  It looks like it's got messed up 
> > > somehow.
> > > 
> > > Re- the other point.  You need, afaik, to have at least five empty 
> > > erase blocks
> > > before jffs2 will try to write to the flash.  This is, yes, half a 
> > > mibibit.
> > > 
> > > Unless this has changed, Jörn?
> > 
> > No, it hasn't.  The changes were started, but never finished.
> > 
> > Jörn
> > 
> > -- 
> > With a PC, I always felt limited by the software available. On Unix, 
> > I am limited only by my knowledge.
> > -- Peter J. Schoenster
> 
> -- 
> Paul van Gool                                               Rincon Networks
> paul.vangool@rinconnetworks.com                              (805)-705-1442

-- 
Paul van Gool                                               Rincon Networks
paul.vangool@rinconnetworks.com                              (805)-705-1442

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-06-25 20:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-25 15:48 No space left on almost empty JFFS2 filesystem Paul van Gool
2003-06-25 15:52 ` Jasmine Strong
2003-06-25 15:58   ` Paul van Gool
2003-06-25 18:20     ` Paul van Gool
2003-06-25 18:24       ` Paul van Gool
2003-06-25 18:29         ` Jasmine Strong
2003-06-25 18:49           ` Jörn Engel
2003-06-25 19:44             ` Paul van Gool
2003-06-25 20:03               ` Paul van Gool
2003-06-25 19:52         ` Thomas Gleixner
2003-06-25 19:43           ` Paul van Gool
2003-06-25 16:04   ` Jörn Engel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox