All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Ken Offer <koffer@arlut.utexas.edu>
Cc: LinuxMTD <linux-mtd@lists.infradead.org>
Subject: Re: Problem: 51MB partition max size on jffs2
Date: Thu, 05 Dec 2002 00:20:44 +0100	[thread overview]
Message-ID: <200212050020.44734.tglx@linutronix.de> (raw)
In-Reply-To: <40170F3C-07DD-11D7-937A-000393467F1A@arlut.utexas.edu>

On Thursday 05 December 2002 00:08, Ken Offer wrote:
> On Wednesday, December 4, 2002, at 04:02  PM, Thomas Gleixner wrote:
> > On Wednesday 04 December 2002 23:00, Ken Offer wrote:
> >> On Wednesday, December 4, 2002, at 11:47  AM, Thomas Gleixner wrote:
> >>> Latest CVS code ?
> >>
> >> I tried it with an older version (circa 20020819) and the latest code
> >> (20021202).  Same result.  I am going to try the change Dave Ellis
> >> <DGE@sixnetio.com> suggested.
> >
> > Strange. Could you please tell me, what output the latest CVS code
> > produces
>
> Well, I was getting a mount failure.  There wasn't much info other than
> that.  If you look in the latest (20021202) jffs2 build.c file, you can
> see if the kmalloc of c->blocks fails in jffs2_do_mount_fs, no debug
> message is printed.  Only a non-mem error is returned.  That is
> consistent with what I was seeing, even with the highest verbosity
> debugging on.
>
> I made the change to use vmalloc/vfree for c->blocks and that seemd to
> fix the problem.  kmalloc is indeed limited to 128KB.  Of course, I
> made the change to the 20020819 code.  I'll try the vmalloc change with
> the latest CVS code as well and see how that holds up.
Please wait. 
Could you please verify, if the code in fs. c does, what it should do ?

int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
{
SNIP
	c->flash_size = c->mtd->size;
	/* 
	 * Check, if we have to concatenate physical blocks to larger virtual blocks
	 * to reduce the memorysize for c->blocks. (kmalloc allows max. 128K 
allocation)
	 */
	blocks = c->flash_size / c->mtd->erasesize;
	while ((blocks * sizeof (struct jffs2_eraseblock)) > (128 * 1024))
		blocks >>= 1;
	
	c->sector_size = c->flash_size / blocks;
	if (c->sector_size != c->mtd->erasesize)
		printk(KERN_INFO "jffs2: Erase block size too small (%dKiB). Using virtual 
blocks size (%dKiB) instead\n", 
			c->mtd->erasesize / 1024, c->sector_size / 1024);

This is processed before calling jffs2_do_mount_fs. There is calculated:

	c->nr_blocks = c->flash_size / c->sector_size;
	c->blocks = kmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks, 
GFP_KERNEL);
	if (!c->blocks)
		return -ENOMEM;

So it should rely on the previous adjusted sectorsize.

-- 
Thomas
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

  reply	other threads:[~2002-12-04 22:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-04 16:54 Problem: 51MB partition max size on jffs2 Ken Offer
2002-12-04 17:47 ` Thomas Gleixner
2002-12-04 22:00   ` Ken Offer
2002-12-04 22:02     ` Thomas Gleixner
2002-12-04 23:08       ` Ken Offer
2002-12-04 23:20         ` Thomas Gleixner [this message]
2002-12-05 17:53           ` Ken Offer
2002-12-04 18:41 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2002-12-04 18:44 Dave Ellis
2002-12-04 18:46 ` David Woodhouse
2002-12-04 19:01   ` Thomas Gleixner
2002-12-04 19:04     ` Charles Manning
2002-12-04 19:10       ` Thomas Gleixner
2002-12-04 20:58 Dave Ellis
2002-12-06 21:00 Dave Ellis

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=200212050020.44734.tglx@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=koffer@arlut.utexas.edu \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.