[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with jffs2_rename() ?



Hi all,

Looks like JFFS2 doesn't handle properly moving/deleting
files in massive quantities... or am I doing something
really wrong.

(I started out with MTD code from kernel 2.4.13, and then
merged a recent CVS snapshot (from tuesday I think), both
expose the same behaviour))

I start with 83% free:

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock2            3072      2552       520  83% /

Then run this script for a while:

#! /bin/sh

while test 0
do
        echo "Hello World" > /reg/test.new
        mv /reg/test.new /reg/test
        echo "one"
done

(So that's: "Create a new file, copy it always to the same
spot").

After 3000 iterations or so, the file system complains it's
full and it looks that way indeed:

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock2            3072      2948       124  96% /

Obviously that's not right as no data as been actually
added.  However, a reset "fixes" it and comes back to what I
expected:

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock2            3072      2552       520  83% /

So... something must not be cleaned properly somewhere.

In a fit of inspiration, I tried changing my script to:

- repeatedly cp a file to another. This does not fill the
  file system.
- repeatedly cp/rm: this does not fill it either.

Therefore: it looks like there is something wrong in
jff2_rename(), but I don't know much about the insides of
JFFS2 at all...

Is this a known problem? Any hints as to what to look at?

Cheers,
Yves


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com