public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] jffs2 write in 4kB blocks over the network?
@ 2008-04-07 10:48 Jürgen Lambrecht
  2008-04-07 13:08 ` Gary Thomas
  2008-04-07 13:26 ` Markus Schaber
  0 siblings, 2 replies; 7+ messages in thread
From: Jürgen Lambrecht @ 2008-04-07 10:48 UTC (permalink / raw)
  To: eCos Discussion

Hello,

the default block size in jffs2 is 4kB. But with FTP, packets have at 
most 1448 B payload.
If I put a file of 12kB, is the file then put in 3 nodes if 4kB, or is 
it put in 9 nodes (because FTP uses 9 packets) ?

Kind regards,

-- 
Jürgen Lambrecht
R&D Engineer
Televic Transport Systems
http://www.televic.com
Televic NV / SA (main office)  	
Leo Bekaertlaan 1
B-8870 Izegem
Tel: +32 (0)51 303045
Fax: +32 (0)51 310670


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] jffs2 write in 4kB blocks over the network?
  2008-04-07 10:48 [ECOS] jffs2 write in 4kB blocks over the network? Jürgen Lambrecht
@ 2008-04-07 13:08 ` Gary Thomas
  2008-04-07 13:26 ` Markus Schaber
  1 sibling, 0 replies; 7+ messages in thread
From: Gary Thomas @ 2008-04-07 13:08 UTC (permalink / raw)
  To: Jürgen Lambrecht; +Cc: eCos Discussion

Jürgen Lambrecht wrote:
> Hello,
> 
> the default block size in jffs2 is 4kB. But with FTP, packets have at 
> most 1448 B payload.
> If I put a file of 12kB, is the file then put in 3 nodes if 4kB, or is 
> it put in 9 nodes (because FTP uses 9 packets) ?

JFFS2 will pack your data in the most efficient way into your
actual FLASH blocks.  In fact, depending on configuration and
settings, it will even compress it along the way, so you've
no real idea how many FLASH blocks a given set of data will
require (except that it will be less than the actual data
size divided by the FLASH block size - compression is never
used if it causes the data to grow).

The fact that your incoming data via FTP or whatever comes
in smaller chunks is irrelevant - writes are buffered as
needed.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] jffs2 write in 4kB blocks over the network?
  2008-04-07 10:48 [ECOS] jffs2 write in 4kB blocks over the network? Jürgen Lambrecht
  2008-04-07 13:08 ` Gary Thomas
@ 2008-04-07 13:26 ` Markus Schaber
  2008-04-07 13:34   ` Gary Thomas
  1 sibling, 1 reply; 7+ messages in thread
From: Markus Schaber @ 2008-04-07 13:26 UTC (permalink / raw)
  To: ecos-discuss

Hi, Jürgen,

Jürgen Lambrecht <J.Lambrecht@televic.com> wrote:

> the default block size in jffs2 is 4kB. But with FTP, packets have at 
> most 1448 B payload.
> If I put a file of 12kB, is the file then put in 3 nodes if 4kB, or is 
> it put in 9 nodes (because FTP uses 9 packets) ?

Besides what Jürgen wrote, it also depends on how your FTP program
buffers, which parts it writes in a single write call, and when it
syncs/flushes buffers.


Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] jffs2 write in 4kB blocks over the network?
  2008-04-07 13:26 ` Markus Schaber
@ 2008-04-07 13:34   ` Gary Thomas
  2008-04-07 13:40     ` Markus Schaber
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2008-04-07 13:34 UTC (permalink / raw)
  To: Markus Schaber; +Cc: ecos-discuss

Markus Schaber wrote:
> Hi, Jürgen,
> 
> Jürgen Lambrecht <J.Lambrecht@televic.com> wrote:
> 
>> the default block size in jffs2 is 4kB. But with FTP, packets have at 
>> most 1448 B payload.
>> If I put a file of 12kB, is the file then put in 3 nodes if 4kB, or is 
>> it put in 9 nodes (because FTP uses 9 packets) ?
> 
> Besides what Jürgen wrote, it also depends on how your FTP program
> buffers, which parts it writes in a single write call, and when it
> syncs/flushes buffers.

It still doesn't matter because the file system and/or JFFS2 will
be buffering it to suit their needs.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] jffs2 write in 4kB blocks over the network?
  2008-04-07 13:34   ` Gary Thomas
@ 2008-04-07 13:40     ` Markus Schaber
  2008-04-07 14:37       ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Schaber @ 2008-04-07 13:40 UTC (permalink / raw)
  To: ecos-discuss

Hi, Gary,

Gary Thomas <gary@mlbassoc.com> wrote:

> Markus Schaber wrote:
> >> the default block size in jffs2 is 4kB. But with FTP, packets have at 
> >> most 1448 B payload.
> >> If I put a file of 12kB, is the file then put in 3 nodes if 4kB, or is 
> >> it put in 9 nodes (because FTP uses 9 packets) ?
> > 
> > Besides what Jürgen wrote, it also depends on how your FTP program
> > buffers, which parts it writes in a single write call, and when it
> > syncs/flushes buffers.
> 
> It still doesn't matter because the file system and/or JFFS2 will
> be buffering it to suit their needs.

Do you really say that JFFS2 on eCos ignores calls to fflush() & co?

So then it is unusable for every application that needs transactional
consistency.

Regards,
Markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] jffs2 write in 4kB blocks over the network?
  2008-04-07 13:40     ` Markus Schaber
@ 2008-04-07 14:37       ` Gary Thomas
  2008-04-07 14:55         ` Jürgen Lambrecht
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2008-04-07 14:37 UTC (permalink / raw)
  To: Markus Schaber; +Cc: ecos-discuss

Markus Schaber wrote:
> Hi, Gary,
> 
> Gary Thomas <gary@mlbassoc.com> wrote:
> 
>> Markus Schaber wrote:
>>>> the default block size in jffs2 is 4kB. But with FTP, packets have at 
>>>> most 1448 B payload.
>>>> If I put a file of 12kB, is the file then put in 3 nodes if 4kB, or is 
>>>> it put in 9 nodes (because FTP uses 9 packets) ?
>>> Besides what Jürgen wrote, it also depends on how your FTP program
>>> buffers, which parts it writes in a single write call, and when it
>>> syncs/flushes buffers.
>> It still doesn't matter because the file system and/or JFFS2 will
>> be buffering it to suit their needs.
> 
> Do you really say that JFFS2 on eCos ignores calls to fflush() & co?
> 
> So then it is unusable for every application that needs transactional
> consistency.

I'm sure that this is not the case - the FLASH should be consistent
after a flush.

Tha5 said, this discussion should really be on the JFFS2 mailing
list, since they'll be able to better answer the questions
and concerns.  Try taking it to linux-mtd@lists.infradead.org

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] jffs2 write in 4kB blocks over the network?
  2008-04-07 14:37       ` Gary Thomas
@ 2008-04-07 14:55         ` Jürgen Lambrecht
  0 siblings, 0 replies; 7+ messages in thread
From: Jürgen Lambrecht @ 2008-04-07 14:55 UTC (permalink / raw)
  To: Gary Thomas, Markus Schaber; +Cc: ecos-discuss

Thanks for your replies.
My next mail will explain why I sent this mail (FTP runs out of JFFS2 
nodes and trashes the file system).

Gary Thomas wrote:

> Markus Schaber wrote:
>
>> Hi, Gary,
>>
>> Gary Thomas <gary@mlbassoc.com> wrote:
>>
>>> Markus Schaber wrote:
>>>
>>>>> the default block size in jffs2 is 4kB. But with FTP, packets have 
>>>>> at most 1448 B payload.
>>>>> If I put a file of 12kB, is the file then put in 3 nodes if 4kB, 
>>>>> or is it put in 9 nodes (because FTP uses 9 packets) ?
>>>>
>>>> Besides what Jürgen wrote, it also depends on how your FTP program
>>>> buffers, which parts it writes in a single write call, and when it
>>>> syncs/flushes buffers.
>>>
ok; I don't flush. I just do in a loop: recv(socket,buf,...); 
fwrite(buf,...);

But for your information: the jffs2 sync function is empty 
(src/js-ecos.c::jffs2_fo_fsync(..)) because "Data is always permanently 
where it belongs, nothing to do here."

Kind regards,

Jürgen


>>> It still doesn't matter because the file system and/or JFFS2 will
>>> be buffering it to suit their needs.
>>
>>
>> Do you really say that JFFS2 on eCos ignores calls to fflush() & co?
>>
>> So then it is unusable for every application that needs transactional
>> consistency.
>
>
> I'm sure that this is not the case - the FLASH should be consistent
> after a flush.
>
> Tha5 said, this discussion should really be on the JFFS2 mailing
> list, since they'll be able to better answer the questions
> and concerns.  Try taking it to linux-mtd@lists.infradead.org
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2008-04-07 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-07 10:48 [ECOS] jffs2 write in 4kB blocks over the network? Jürgen Lambrecht
2008-04-07 13:08 ` Gary Thomas
2008-04-07 13:26 ` Markus Schaber
2008-04-07 13:34   ` Gary Thomas
2008-04-07 13:40     ` Markus Schaber
2008-04-07 14:37       ` Gary Thomas
2008-04-07 14:55         ` Jürgen Lambrecht

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 read-only IMAP folder(s) and NNTP newsgroup(s).