public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Howto provoke the long mount times?
@ 2005-07-22 14:51 Martin Egholm Nielsen
  2005-07-23  5:49 ` "David Müller (ELSOFT AG)"
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Egholm Nielsen @ 2005-07-22 14:51 UTC (permalink / raw)
  To: linux-mtd

Hi there,

In extension of my previous thread regarding the GC blocking writes to 
the NAND, I have a small additional question:

How can I provoke this situation?
It suddenly occur "out of nowhere" - having mount times of nearly 
nothing, to having mount times of minutes (now reduced, though)...

BR,
  Martin Egholm

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

* Re: Howto provoke the long mount times?
  2005-07-22 14:51 Howto provoke the long mount times? Martin Egholm Nielsen
@ 2005-07-23  5:49 ` "David Müller (ELSOFT AG)"
  2005-07-25  7:20   ` Martin Egholm Nielsen
  0 siblings, 1 reply; 3+ messages in thread
From: "David Müller (ELSOFT AG)" @ 2005-07-23  5:49 UTC (permalink / raw)
  To: Martin Egholm Nielsen; +Cc: linux-mtd

Hello

Martin Egholm Nielsen wrote:
> In extension of my previous thread regarding the GC blocking writes to
> the NAND, I have a small additional question:
> 
> How can I provoke this situation?
> It suddenly occur "out of nowhere" - having mount times of nearly
> nothing, to having mount times of minutes (now reduced, though)...

Most probably you are facing the same problem as i have reported in
http://lists.infradead.org/pipermail/linux-mtd/2005-May/012675.html
while creating tar files.

In the meantime i can provoke the same effect also be "copying" serveral
hundred small files (~ 700 bytes) to the NAND flash using the following
"poor mans" copy routine:

static void
Copy(FILE *fi, FILE *fo, size_t bsize)
{
	size_t rlen, wlen;
	char buf[BUFFERSIZE];

	while (!feof(fi)) {
		rlen = fread(&buf, 1, bsize, fi);
		wlen = fwrite(&buf, 1, rlen, fo);
		fflush(fo);

		if (rlen != wlen)
			return;
	}
}


Please note the "fflush()" after the "fwrite()". By varying the "bsize"
parameter and the numbers of files to copy, you should be able to select
the "desired" delay during mount time.


Dave

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

* Re: Howto provoke the long mount times?
  2005-07-23  5:49 ` "David Müller (ELSOFT AG)"
@ 2005-07-25  7:20   ` Martin Egholm Nielsen
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Egholm Nielsen @ 2005-07-25  7:20 UTC (permalink / raw)
  To: linux-mtd

>>In extension of my previous thread regarding the GC blocking writes to
>>the NAND, I have a small additional question:
>>How can I provoke this situation?
>>It suddenly occur "out of nowhere" - having mount times of nearly
>>nothing, to having mount times of minutes (now reduced, though)...
> Most probably you are facing the same problem as i have reported in
> http://lists.infradead.org/pipermail/linux-mtd/2005-May/012675.html
> while creating tar files.
Most likely, yes! :-)
Did you stay with jffs2 or did you turn to yaffs?

> In the meantime i can provoke the same effect also be "copying" serveral
> hundred small files (~ 700 bytes) to the NAND flash using the following
> "poor mans" copy routine:

> static void
> Copy(FILE *fi, FILE *fo, size_t bsize)
> {
> 	size_t rlen, wlen;
> 	char buf[BUFFERSIZE];
> 
> 	while (!feof(fi)) {
> 		rlen = fread(&buf, 1, bsize, fi);
> 		wlen = fwrite(&buf, 1, rlen, fo);
> 		fflush(fo);
> 
> 		if (rlen != wlen)
> 			return;
> 	}
> }
> 
> 
> Please note the "fflush()" after the "fwrite()". By varying the "bsize"
> parameter and the numbers of files to copy, you should be able to select
> the "desired" delay during mount time.

Super! Nice to have in case I "repair" (flash_eraseall) the flashes I 
have, but need to test the behaviour for future versions...

BR,
  Martin

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

end of thread, other threads:[~2005-07-25  7:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-22 14:51 Howto provoke the long mount times? Martin Egholm Nielsen
2005-07-23  5:49 ` "David Müller (ELSOFT AG)"
2005-07-25  7:20   ` Martin Egholm Nielsen

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