public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "\"David Müller (ELSOFT AG)\"" <d.mueller@elsoft.ch>
To: Martin Egholm Nielsen <martin@egholm-nielsen.dk>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Howto provoke the long mount times?
Date: Sat, 23 Jul 2005 07:49:00 +0200	[thread overview]
Message-ID: <42E1DA4C.1000605@elsoft.ch> (raw)
In-Reply-To: <dbr15p$90f$1@sea.gmane.org>

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

  reply	other threads:[~2005-07-23  6:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-22 14:51 Howto provoke the long mount times? Martin Egholm Nielsen
2005-07-23  5:49 ` "David Müller (ELSOFT AG)" [this message]
2005-07-25  7:20   ` Martin Egholm Nielsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42E1DA4C.1000605@elsoft.ch \
    --to=d.mueller@elsoft.ch \
    --cc=linux-mtd@lists.infradead.org \
    --cc=martin@egholm-nielsen.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox