Thanks a lot for your answer.
Here are some complements:
The directory isn't deleted after un umount/mount or reboot, still
undeletable.
I've tried the "echo 3 > /proc/sys/vm/drop_caches" but I still get the
"Directory not empty" message without being able to delete the folder.
I've tried a modification on "yaffs_guts.c" which solves the problem but I'm
not sure if it is safe.
The modification is on "yaffs_change_obj_name()", my partition is not
detected as yaffs2 since it is small (56Mo) and in "auto" mode.
Before:
------------------------------------------------------------------------------------------------
unlink_op = (new_dir == obj->my_dev->unlinked_dir
&& obj->variant_type == YAFFS_OBJECT_TYPE_FILE);
------------------------------------------------------------------------------------------------
After:
------------------------------------------------------------------------------------------------
unlink_op = (new_dir == obj->my_dev->unlinked_dir
&& (obj->variant_type == YAFFS_OBJECT_TYPE_FILE
|| new_dir->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY));
------------------------------------------------------------------------------------------------
Best regards and thanks for the great job
Baptiste VIAL
-----Message d'origine-----
De : Charles Manning [
mailto:manningc2@actrix.gen.nz]
Envoyé : lundi 31 janvier 2011 03:56
À :
yaffs@lists.aleph1.co.uk
Cc : Baptiste Vial
Objet : Re: [Yaffs] Unable to remove a directory which has juste been
created
On Saturday 29 January 2011 01:06:34 Baptiste Vial wrote:
> Hi everyone,
>
>
>
> I’m using the last version of yaffs2
> (2c8eb2bdc3e753893ecc0dd0cd9cba791d4e16db) with a 2.6.28 kernel on my
> ARM board.
>
>
>
> If I try to create a directory and remove it, it always fail saying
> the directory is not empty (but it is since I’ve not created any
> files)
>
>
>
> Here what i see:
>
>
>
> *[/]# cd /home*
>
> *[/home]# mkdir test5*
>
> *[/home]# rm -Rf test5 *
>
> *rm: unable to remove `test5': Directory not empty*
I just tried this on a 2.6.35 system with no errors though I was not using
busybox.
>
>
>
> if I do a “echo +error+deletion+os-write > /proc/yaffs” here is what I
> can
> see:
>
>
>
> <7>yaffs: line 2549 delete of chunk 103438
>
> <7>yaffs: line 2549 delete of chunk 103439
>
> <7>yaffs: line 2549 delete of chunk 103440
>
> <7>yaffs: yaffs_touch_super() sb = c1f59c00
>
> <7>yaffs: line 2549 delete of chunk 103447
>
> <7>yaffs: line 2549 delete of chunk 103451
>
> <7>yaffs: yaffs_readdir: starting at 0
>
> <7>yaffs: yaffs_readdir: entry . ino 401
>
> <7>yaffs: yaffs_readdir: entry .. ino 259
>
> <7>yaffs: yaffs_readdir: starting at 2
>
> <7>yaffs: yaffs_unlink 259:test5
>
> <7>yaffs: yaffs_touch_super() sb = c1f59c00
>
> <7>yaffs: line 3419 delete of chunk 103656
>
> <7>yaffs: line 2549 delete of chunk 103452
>
> <7>yaffs: line 2549 delete of chunk 103453
>
> <7>yaffs: line 2549 delete of chunk 103454
>
> <7>yaffs: line 2549 delete of chunk 103455
>
> <7>yaffs: yaffs_touch_super() sb = c1f59c00
>
> <7>yaffs: line 1690 delete of chunk 103673
>
> <7>yaffs: FreeObject c0d8cf04 inode 00000000
>
>
>
> To perform the “rm” I’m using BusyBox v1.18.1 Note that I don’t have
> any problem unlinking files.
>
>
>
> What kind of test should I do to target more precisely the problem ?
What is worth trying to figure out is if the problem is internal to yaffs
or external to yaffs. One of the problems that confuses the picture is the
kernel caching.
There are a few things worth doing...
1) Was the directory actually deleted? If you umount and then mount is it
still there?
2) The other thing to try is to drop the caches and see if that changes
anything. This can be done by
echo 3 > /proc/sys/vm/drop_caches
-- Charles