Howto provoke the long mount times?

"David Müller (ELSOFT AG)" d.mueller at elsoft.ch
Sat Jul 23 01:49:00 EDT 2005


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




More information about the linux-mtd mailing list