From: Artem Bityutskiy <dedekind1@gmail.com>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [RFC] [MTD-utils] mkfs.jffs2: JFFS2 and minimal erase block size
Date: Tue, 07 Sep 2010 12:21:35 +0300 [thread overview]
Message-ID: <1283851295.2979.26.camel@localhost> (raw)
In-Reply-To: <AANLkTim5Feo4a_37eRpx0TSsNWBoR2TxtX7cUPxRG6ry@mail.gmail.com>
On Tue, 2010-09-07 at 11:16 +0200, Yegor Yefremov wrote:
> Hello Artem,
>
> >> I'm using a NOR flash SST39VF3201. According to its data sheet the
> >> erase size is 2 Kword. That corresponds to -e 0x1000 value. But the
> >> mkfs.jffs2 utility has a limit of 0x2000 bytes. If I change this limit
> >> to 0x1000 and create an image, I can successfully mount and use it,
> >> with 8KiB value the jffs2 driver fails to work with such an image. I
> >> have found some similar complains like this one
> >> http://lists.infradead.org/pipermail/linux-mtd/2009-February/024523.html,
> >> but no one seems to have asked this question on the list.
> >>
> >> Is there any reason for limiting erase block to 0x2000?
> >>
> >> I've created a patch to decrease this value to 0x1000, but perhaps
> >> there are any other way?
> >
> > JFFS2 should be able to fit at least one node to eraseblock. The maximum
> > node size is 4KiB+few bytes. This is why the minimum eraseblocks size is
> > 8KiB.
> >
> > But in practice, even 8KiB is bad because you and up with wasting a lot
> > of space at the end of eraseblocks.
> >
> > You should join several erasblock into one virtual eraseblock of 64 or
> > 128 KiB and use it - this will be more optiomal.
>
> I tried to use 128KiB, but still got following errors:
>
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f4024:
> 0xadec instead
> Further such events for this erase block will not be printed
> Node at 0x000f4fb8 with length 0x0000004a would run over the end of
> the erase block
> Perhaps the file system was created with the wrong erase size?
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f5000:
> 0x706d instead
> # JFFS2 warning: (563) jffs2_do_read_inode_internal: Truncating ino
> #318 to 62192 bytes failed because it only had 61440 bytes to start
> with!
> JFFS2 warning: (563) jffs2_do_read_inode_internal: Truncating ino #424
> to 7828 bytes failed because it only had 4096 bytes to start with!
> JFFS2 warning: (563) jffs2_do_read_inode_internal: Truncating ino #489 to 11528
> bytes failed because it only had 8192 bytes to start with!
You need to make your driver report 128KiB eraseblock size and emulate
it, then it'll work. It won't work out of the box.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
prev parent reply other threads:[~2010-09-07 9:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-01 15:36 [RFC] [MTD-utils] mkfs.jffs2: JFFS2 and minimal erase block size Yegor Yefremov
2010-09-02 11:38 ` Artem Bityutskiy
2010-09-07 9:16 ` Yegor Yefremov
2010-09-07 9:21 ` Artem Bityutskiy [this message]
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=1283851295.2979.26.camel@localhost \
--to=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=yegorslists@googlemail.com \
/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;
as well as URLs for NNTP newsgroup(s).