public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* jffs2 fs overload
@ 2006-03-20  7:23 igor.trevisan
  0 siblings, 0 replies; 5+ messages in thread
From: igor.trevisan @ 2006-03-20  7:23 UTC (permalink / raw)
  To: linux-mtd

Hi all,

I'm defining the flash partitions content for my target
and I need a rewritable flash area.
So I formatted and mounted a flash partition as jffs2.
What I noted is that, on a 1MByte flash area I loose
about 600K immediately. If I use the command df I see
that only 30less than 400k are really available.
Is it possible that this is the normal overload if a 
format my flash partition with jffs2?
Or am I doing something wtong?
Is there any good guide or document that can help me
building a jffs2 RW flash partition?
Please forgive me if I couldn't be very clear! If needed to help me 
better I can try to give more information and details about my problem.
Thanks in advance,
Igor.
-- 
--- BlueWind 
--- Embedded Systems Design 
--- Borgo Pieve 55c interno c
--- 31033 Castelfranco V.to (TV)
--- Tel.: +39 0423 723431 Fax.: +39 0423 744738
--- mailto: igor.trevisan@bluewind.it
--- http://www.bluewind.it
------------------------------------------------------------------

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

* RE: jffs2 fs overload
@ 2006-03-20  8:30 Selmeci, Tamas
  2006-03-27 17:37 ` igor.trevisan
  2006-03-27 17:38 ` igor.trevisan
  0 siblings, 2 replies; 5+ messages in thread
From: Selmeci, Tamas @ 2006-03-20  8:30 UTC (permalink / raw)
  To: igor.trevisan, linux-mtd

Hello!

> I'm defining the flash partitions content for my target
> and I need a rewritable flash area.
> So I formatted and mounted a flash partition as jffs2.
> What I noted is that, on a 1MByte flash area I loose
> about 600K immediately. If I use the command df I see
> that only 30less than 400k are really available.
> Is it possible that this is the normal overload if a 
> format my flash partition with jffs2?
> Or am I doing something wtong?

I think this is normal, JFFS2 allocates inodes (as far as I know) in
advance like ext2 also does - in case of a very small filesystem, this
may lead to serious capacity waste... If my assumption is wrong,
somebody please correct me.

> Is there any good guide or document that can help me
> building a jffs2 RW flash partition?

I would make a filesystem on a host PC, and then make a jffs2 from it
(mkjffs). The image can be written with a download tool.

Bye
--
Tamas Selmeci

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

* RE: jffs2 fs overload
  2006-03-20  8:30 jffs2 fs overload Selmeci, Tamas
@ 2006-03-27 17:37 ` igor.trevisan
  2006-03-27 17:38 ` igor.trevisan
  1 sibling, 0 replies; 5+ messages in thread
From: igor.trevisan @ 2006-03-27 17:37 UTC (permalink / raw)
  To: Selmeci, Tamas; +Cc: linux-mtd

Hi Tamas,

thanks for your answer.
Just another one: is it possible to have a single RFS that 's mounted
read/write?
Is it enough to specify r/w on the mtdparts secton of the command 
line? (I'm using that way to define flash partition).
In this way I could have three partition: bootloader, kernel and RFS
with the rfs mounted rewritable but with the files that cannot be 
changed that don't have write permission.
In this way I could avoid the overload due to having two small partition
each with its JFFS2 tables and structures and so on.
Is it right?
Any suggestion and comment is obviously welcome!
Thanks in advance,
Igor.
  

On 20 Mar 2006 at 9:30, Selmeci, Tamas wrote:

> Hello!
> 
> > I'm defining the flash partitions content for my target
> > and I need a rewritable flash area.
> > So I formatted and mounted a flash partition as jffs2.
> > What I noted is that, on a 1MByte flash area I loose
> > about 600K immediately. If I use the command df I see
> > that only 30less than 400k are really available.
> > Is it possible that this is the normal overload if a 
> > format my flash partition with jffs2?
> > Or am I doing something wtong?
> 
> I think this is normal, JFFS2 allocates inodes (as far as I know) in
> advance like ext2 also does - in case of a very small filesystem, this
> may lead to serious capacity waste... If my assumption is wrong,
> somebody please correct me.
> 
> > Is there any good guide or document that can help me
> > building a jffs2 RW flash partition?
> 
> I would make a filesystem on a host PC, and then make a jffs2 from it
> (mkjffs). The image can be written with a download tool.
> 
> Bye
> --
> Tamas Selmeci
> 
> 

-- 
--- BlueWind 
--- Embedded Systems Design 
--- Borgo Pieve 55c interno c
--- 31033 Castelfranco V.to (TV)
--- Tel.: +39 0423 723431 Fax.: +39 0423 744738
--- mailto: igor.trevisan@bluewind.it
--- http://www.bluewind.it
------------------------------------------------------------------

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

* RE: jffs2 fs overload
  2006-03-20  8:30 jffs2 fs overload Selmeci, Tamas
  2006-03-27 17:37 ` igor.trevisan
@ 2006-03-27 17:38 ` igor.trevisan
  2006-03-28  7:34   ` Selmeci, Tamas
  1 sibling, 1 reply; 5+ messages in thread
From: igor.trevisan @ 2006-03-27 17:38 UTC (permalink / raw)
  To: Selmeci, Tamas; +Cc: linux-mtd

Hi Tamas,

thanks for your answer.
Just another one: is it possible to have a single RFS that 's mounted
read/write?
Is it enough to specify r/w on the mtdparts section of the command 
line? (I'm using that way to define flash partitions).
In this way I could have three partitions: bootloader, kernel and RFS
with the rfs mounted rewritable but with the files that cannot be 
changed that don't have write permission.
In this way I could avoid the overload due to having two small partitions
each one with its JFFS2 tables and structures and so on.
Is it right?
Any suggestion and comment is obviously welcome!
Thanks in advance,
Igor.
  

On 20 Mar 2006 at 9:30, Selmeci, Tamas wrote:

> Hello!
> 
> > I'm defining the flash partitions content for my target
> > and I need a rewritable flash area.
> > So I formatted and mounted a flash partition as jffs2.
> > What I noted is that, on a 1MByte flash area I loose
> > about 600K immediately. If I use the command df I see
> > that only 30less than 400k are really available.
> > Is it possible that this is the normal overload if a 
> > format my flash partition with jffs2?
> > Or am I doing something wtong?
> 
> I think this is normal, JFFS2 allocates inodes (as far as I know) in
> advance like ext2 also does - in case of a very small filesystem, this
> may lead to serious capacity waste... If my assumption is wrong,
> somebody please correct me.
> 
> > Is there any good guide or document that can help me
> > building a jffs2 RW flash partition?
> 
> I would make a filesystem on a host PC, and then make a jffs2 from it
> (mkjffs). The image can be written with a download tool.
> 
> Bye
> --
> Tamas Selmeci
> 
> 

-- 
--- BlueWind 
--- Embedded Systems Design 
--- Borgo Pieve 55c interno c
--- 31033 Castelfranco V.to (TV)
--- Tel.: +39 0423 723431 Fax.: +39 0423 744738
--- mailto: igor.trevisan@bluewind.it
--- http://www.bluewind.it
------------------------------------------------------------------

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

* RE: jffs2 fs overload
  2006-03-27 17:38 ` igor.trevisan
@ 2006-03-28  7:34   ` Selmeci, Tamas
  0 siblings, 0 replies; 5+ messages in thread
From: Selmeci, Tamas @ 2006-03-28  7:34 UTC (permalink / raw)
  To: igor.trevisan; +Cc: linux-mtd

Hi!

> Just another one: is it possible to have a single RFS that 's mounted
> read/write?

If you are talking about this layout: bootloader, kernel, rootfs partition,
then my answer is: yes. My board works very similarly (one more parameter
partition is added, but it could be left out).

If you want only one partition containing kernel, rootfs etc. then it's
a harder quiestion.
I've been wondering if it's possible to put only a root FS on the flash... 
Currently I don't exactly know, although this would be useful for me too, because
I may need this kind of solution in the future. My theory is the following: let's assume 
that I format the entire flash with JFFS2. If it's possible to put
some kind of kernel loader code in the very beginning of the flash,
then I think I can do. My S3C2410 is capable of loading the first
4 KB of the flash in autoboot mode, and then executes it. If other
processors are also capable of this, then probably it can be done.
But I'm not sure any filesystem provides such functionality (leaving
the first x KB intact where a kernel loader program should reside).

> Is it enough to specify r/w on the mtdparts section of the command 
> line? (I'm using that way to define flash partitions).

Not likely... when the kernel finished booting and starts /sbin/init etc.,
then you should remount your partition in read/write mode. I'd prefer
this solution - of course, with a writable filesystem only. 

> In this way I could have three partitions: bootloader, kernel and RFS
> with the rfs mounted rewritable but with the files that cannot be 
> changed that don't have write permission.

Sounds good, I suggest you the remounting as r/w.

> In this way I could avoid the overload due to having two small partitions
> each one with its JFFS2 tables and structures and so on.
> Is it right?

Bootloader and kernel partitions don't have to be formatted with
any filesystem. I have simply downloaded bootloader and kernel images
to the corresponding partitions and they work - although I can't
overwrite them from the running Linux, only with the bootloader
command prompt or the board's builtin software. Think of filesystems in 
case of root (data) partitions only!

Bye
--
Tamas Selmeci

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

end of thread, other threads:[~2006-03-28  7:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-20  8:30 jffs2 fs overload Selmeci, Tamas
2006-03-27 17:37 ` igor.trevisan
2006-03-27 17:38 ` igor.trevisan
2006-03-28  7:34   ` Selmeci, Tamas
  -- strict thread matches above, loose matches on Subject: below --
2006-03-20  7:23 igor.trevisan

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