* mtd filesystem across different sector sizes in the same part
@ 2003-10-06 19:33 Cam Mayor
2003-10-06 19:36 ` David Woodhouse
0 siblings, 1 reply; 4+ messages in thread
From: Cam Mayor @ 2003-10-06 19:33 UTC (permalink / raw)
To: a-linux-mtd
After doing a flash storage map for one of our devices and based on reading a
recent question to this list, i thought of another question.
In my flash part (intel 28f320c3) there are 8 x 8kB blocks and 63 x 64 kB
blocks. I believe that [1] MTD can span the two block sizes effectively for
it to be recognized as a single MTD device. JFFS2, IIRC, uses 5 flash blocks
for flash filesystem overhead. Do those blocks have to be any specific size
relative to the rest of the filesystem blocks? Will it use the first five
blocks, or does it move around for wear levelling? Will JFFS2 get confused
by different block sizes, or is that already handled in the MTD layer?
If the 5 blocks move around, is there any way to predict how much space will
be available in the filesystem? (eg. one moment you have 5 overhead blocks
in the 8kB area and have 70kB free. the next moment you have 4 overhead
blocks in the 8kB area, and one in the 64kB area, leaving you with 14kB free
space)
thanks,
cam
[1] please correct me if i'm wrong
--
Cameron Mayor
Iders Incorporated
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mtd filesystem across different sector sizes in the same part
2003-10-06 19:33 mtd filesystem across different sector sizes in the same part Cam Mayor
@ 2003-10-06 19:36 ` David Woodhouse
2003-10-06 20:45 ` Cam Mayor
0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2003-10-06 19:36 UTC (permalink / raw)
To: Cam Mayor; +Cc: a-linux-mtd
On Mon, 2003-10-06 at 14:33 -0500, Cam Mayor wrote:
> After doing a flash storage map for one of our devices and based on reading a
> recent question to this list, i thought of another question.
>
> In my flash part (intel 28f320c3) there are 8 x 8kB blocks and 63 x 64 kB
> blocks. I believe that [1] MTD can span the two block sizes effectively for
> it to be recognized as a single MTD device. JFFS2, IIRC, uses 5 flash blocks
> for flash filesystem overhead. Do those blocks have to be any specific size
> relative to the rest of the filesystem blocks? Will it use the first five
> blocks, or does it move around for wear levelling? Will JFFS2 get confused
> by different block sizes, or is that already handled in the MTD layer?
JFFS2 will use the 'major' erase size, and treat your 8 * 8KiB blocks as
a single 64KiB block.
--
dwmw2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mtd filesystem across different sector sizes in the same part
2003-10-06 19:36 ` David Woodhouse
@ 2003-10-06 20:45 ` Cam Mayor
2003-10-06 21:08 ` David Woodhouse
0 siblings, 1 reply; 4+ messages in thread
From: Cam Mayor @ 2003-10-06 20:45 UTC (permalink / raw)
To: David Woodhouse; +Cc: a-linux-mtd
On Monday 06 October 2003 14:36, David Woodhouse wrote:
> On Mon, 2003-10-06 at 14:33 -0500, Cam Mayor wrote:
> > In my flash part (intel 28f320c3) there are 8 x 8kB blocks and 63 x 64 kB
> > blocks. I believe that [1] MTD can span the two block sizes effectively
> > for it to be recognized as a single MTD device. JFFS2, IIRC, uses 5
> > flash blocks for flash filesystem overhead. Do those blocks have to be
> > any specific size relative to the rest of the filesystem blocks? Will it
> > use the first five blocks, or does it move around for wear levelling?
> > Will JFFS2 get confused by different block sizes, or is that already
> > handled in the MTD layer?
>
> JFFS2 will use the 'major' erase size, and treat your 8 * 8KiB blocks as
> a single 64KiB block.
In my particular usage, the first two (of eight) "small" blocks are used by
the bootloader, leaving a free area of 6 x 8kiB blocks + 6 x 64 kiB blocks.
Just now i tried specifying this oddly shaped area on the kernel command
line, with the result:
mtd: partition "free" doesn't start on an erase block boundary -- force
read-only
So, it sounds like JFFS2 won't handle this specific situation, as mtd itself
is unwilling to deal with it. (the partition "free" does start on an erase
block boundary - but it is one of the smaller block boundaries, not the major
erase size)
I don't have a multi-flash system, so i can't test this, but i wonder how
this would work for a system concatenated across two flash chips with
different erase block sizes where the numbers don't allow them to align
nicely.
Here's another thing i just thought of but haven't noticed in my mtd research
in the past (and couldn't see anything relevant in Configure.help): is there
a way to get two non-continuous mtd partitions to host a jffs2 filesystem?
eg.
mtd5: 00400000 00020000 "userarea1"
mtd6: 00400000 00020000 "something_else"
mtd7: 00400000 00020000 "userarea2"
is there a way to use the disjoint mtd5+mtd7 together to host a continuous
filesystem?
thanks for the info.
--
Cameron Mayor
Iders Incorporated
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mtd filesystem across different sector sizes in the same part
2003-10-06 20:45 ` Cam Mayor
@ 2003-10-06 21:08 ` David Woodhouse
0 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2003-10-06 21:08 UTC (permalink / raw)
To: Cam Mayor; +Cc: a-linux-mtd
On Mon, 2003-10-06 at 15:45 -0500, Cam Mayor wrote:
> In my particular usage, the first two (of eight) "small" blocks are used by
> the bootloader, leaving a free area of 6 x 8kiB blocks + 6 x 64 kiB blocks.
> Just now i tried specifying this oddly shaped area on the kernel command
> line, with the result:
> mtd: partition "free" doesn't start on an erase block boundary -- force
> read-only
Yep. There exists no 'major' erasesize. All real hardware devices have
one, we don't try to work around it.
> is there a way to use the disjoint mtd5+mtd7 together to host a continuous
> filesystem?
See mtdconcat.
--
dwmw2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-10-06 21:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-06 19:33 mtd filesystem across different sector sizes in the same part Cam Mayor
2003-10-06 19:36 ` David Woodhouse
2003-10-06 20:45 ` Cam Mayor
2003-10-06 21:08 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox