S Ashok | 3 Dec 16:10

[Newbie] Few Queries related to JFFS2

Hi all,

I am working on embedded project where we are using 
root filesystem with jffs2 filesystem type( 4MB NOR 
FLASH). I have few queries related to it.

1. Is the erase block size specified while creating jffs2 
   image should be same as that of flash block size ?

2. I have read from the mailing list that free space has to 
   be left for proper functioning of GC  ( hideing them from 
   userspace ). Is there any number ( one or two erase block 
   ) ?

With Thanks,
--

-- 
Ashok S.

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo <at> axis.com

Josh Boyer | 3 Dec 16:59
Picon
Favicon

Re: [Newbie] Few Queries related to JFFS2

On Fri, 2004-12-03 at 09:10, S Ashok wrote:
> Hi all,
> 
> I am working on embedded project where we are using 
> root filesystem with jffs2 filesystem type( 4MB NOR 
> FLASH). I have few queries related to it.
> 
> 1. Is the erase block size specified while creating jffs2 
>    image should be same as that of flash block size ?

In general, yes.

> 
> 2. I have read from the mailing list that free space has to 
>    be left for proper functioning of GC  ( hideing them from 
>    userspace ). Is there any number ( one or two erase block 
>    ) ?

JFFS2 figures this out when it mounts.  The old hard coded method used 5
eraseblocks.  To be safe, I would recommend starting with 5 free.

IIRC, JFFS2 will just mount the filesystem read-only if it doesn't have
enough free eraseblocks.

josh

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo <at> axis.com

(Continue reading)

Pering, Trevor | 5 Dec 19:26
Picon
Favicon

jffs2 with mtdblock

Hello, I'm having trouble mounting jffs2 on a blkmtd device.  The
sequence of commands is below -- am I missing anything?   This is on a
arm-linux 2.4.19 kernel with jffs2 backported from 2.4.27. In the
sequence below, I also try to mount ext2 on the mtd block device just to
see if it works (and it does). And, we use jffs2 successfully on other
mtd partitions in the same system.

Any thoughts? (There are no significant messages in /var/log/messages).
Any way to tell what's going on?

Thanks,
	Trevor

*** CF card is inserted and mounted on /dev/hda1 ***
stargate5:root/ # modprobe blkmtd device=/dev/hda1
stargate5:root/ # cat /proc/mtd                   
dev:    size   erasesize  name
mtd0: 00040000 00040000 "bootldr"
mtd1: 00040000 00040000 "params"
mtd2: 000c0000 00040000 "kernel"
mtd3: 00ec0000 00040000 "filesys"
mtd4: 00140000 00040000 "config"
mtd5: 00ec0000 00040000 "local"
mtd6: 1e83c000 00020000 "blkmtd: /dev/hda1"
stargate5:root/ # mkfs.ext2 /dev/mtdblock/6  # just to test if it works
mke2fs 1.25 (20-Sep-2001)
.... # stuff deleted
This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
stargate5:root/ # mount -t ext2 /dev/mtdblock/6 /mnt/cf1
(Continue reading)

S Ashok | 6 Dec 13:24

Error compiling latest code

Hi all,

I got error while compiling the latest checked out
code. I have attached the details below.

target - mips
kernel - 2.4.20

<snip>
mno-abicalls -fno-pic -pipe -mtune=r4600 -mips2 -Wa,--trap
-nostdinc -iwithprefix include -DKBUILD_BASENAME=background
-c -o background.o background.c

background.c: In function `jffs2_garbage_collect_thread':
background.c:82: error: structure has no member named `nice'
make[3]: *** [background.o] Error 1
</snip>

--

-- 
Ashok S,

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo <at> axis.com

Josh Boyer | 6 Dec 15:04
Picon
Favicon

Re: Error compiling latest code

On Mon, 2004-12-06 at 06:24, S Ashok wrote:
> Hi all,
> 
> I got error while compiling the latest checked out
> code. I have attached the details below.
> 
> target - mips
> kernel - 2.4.20
> 

http://linux-mtd.infradead.org/#kernelversions

josh

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo <at> axis.com

Artem B. Bityuckiy | 6 Dec 15:39
Favicon

Re: Error compiling latest code

In my last  snapshot this line is empty...

On Mon, 6 Dec 2004, S Ashok wrote:

> Hi all,
> 
> I got error while compiling the latest checked out
> code. I have attached the details below.
> 
> target - mips
> kernel - 2.4.20
> 
> <snip>
> mno-abicalls -fno-pic -pipe -mtune=r4600 -mips2 -Wa,--trap
> -nostdinc -iwithprefix include -DKBUILD_BASENAME=background
> -c -o background.o background.c
> 
> background.c: In function `jffs2_garbage_collect_thread':
> background.c:82: error: structure has no member named `nice'
> make[3]: *** [background.o] Error 1
> </snip>
> 
> -- 
> Ashok S,
> 
> 
> 
> To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
> the body of a message to majordomo <at> axis.com
> 
(Continue reading)

S Ashok | 6 Dec 15:46

Undefined reference while linking

Hi all,

I am working on mips board with 2.4.20 kernel. I have
downloaded the latest code and applied the patches
for mtd and jffs2. I am getting the following 
error. Kindly help me.

<snip>
fs/fs.o(.text+0x5c6e4): In function `jffs2_gc_fetch_inode':
: undefined reference to `ilookup'
drivers/mtd/mtdlink.o(.text+0x564c): In function 
`cfi_probe_chip':
: undefined reference to `cfi_interleave'
drivers/mtd/mtdlink.o(.text+0x567c): In function 
`cfi_probe_chip':
: undefined reference to `cfi_interleave'
drivers/mtd/mtdlink.o(.text+0x56b0): In function 
`cfi_probe_chip':
: undefined reference to `cfi_interleave'
drivers/mtd/mtdlink.o(.text+0x57b4): In function 
`cfi_probe_chip':
: undefined reference to `cfi_interleave'
drivers/mtd/mtdlink.o(.text+0x57e4): In function 
`cfi_probe_chip':
: undefined reference to `cfi_interleave
</snip>

With Thanks
--

-- 
Ashok S,
(Continue reading)

Ferenc Havasi | 7 Dec 11:58
Picon
Favicon

Maximal file size

Dear All,

Here is a patch which allows the developer to limit the created file 
size. It can be usefull on embadded devices where there are users who 
don't know too much about the system.

If the user uses too big files JFFS2 can run out of RAM easily - and 
simply hangs the system (dd if=/dev/zero of=/mnt/flash bs=4K hangs the 
system quickly) I know that the the memory requirements of JFFS2 depends 
on not only the size of the opened file but I have no better idea - and 
it solves a part of the problem.

This limitation can be understood by the user, and is not too dificult 
to implement. (see the small patch I attached)

David, can I commit it? Or wait for JFFS3? When will it happen?

Regards,
Ferenc
diff --unified --recursive --new-file mtd2/fs/Kconfig mtd/fs/Kconfig
--- mtd2/fs/Kconfig	2004-11-03 13:57:37.000000000 +0100
+++ mtd/fs/Kconfig	2004-12-07 09:58:31.000000000 +0100
@@ -77,6 +77,21 @@
 		 ECC for JFFS2.  This type of flash chip is not common, however it is
 		 available from STMicro.

+config JFFS2_MAXFILESIZE
+	bool "Use a file size limit"
(Continue reading)

Jörn Engel | 7 Dec 15:59
Picon

4k-aligned nodes

Guys,

while giving a presentation about mtd/jffs2, an interesting idea
popped up.  Might be old.  If it is, please tell me to shut up.

Problem:
GC runs into many interesting corner-cases when collecting nodes that
were partially obsoleted by smaller nodes, etc.  Most notably is this
scenario:

Node 1: 1234567890abcdef1234567890abcdef
Node 2:                12
Node 3: 1234567890abcde
Node 4:                  234567890abcdef

Node 1 is old and contains two copies of non-compressable data.  With
zlib, the two copies are detected and the compressed data basically
has the size of one of the two copies.

Node 2 overwrites some bytes of node 1 right where both copies are
concatenated.

When GC has to copy parts of node 1, it may create two nodes 3 and 4,
that each contain one copy of non-compressable data.  Each of them has
roughly the same size as node 1, so both of them have twice the size.
GC didn't shrink flash footprint, bad.

Solution:
GC always tries to write out 4k-aligned nodes with 4k of uncompressed
data.
(Continue reading)

David Woodhouse | 7 Dec 16:59
Favicon

Re: 4k-aligned nodes

On Tue, 2004-12-07 at 16:52 +0100, Jörn Engel wrote:
> > That's why we have an extra threshold, for the amount of free space
> > which is required for GC to merge nodes. See the logic in
> > jffs2_garbage_collect_dnode() which expands 'start' and 'end'.
> 
> 220loc, looks a bit complicated.  If only I had some time to work on
> jffs2!

Heh. You and me both :)

--

-- 
dwmw2

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo <at> axis.com


Gmane