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