[Yaffs-archive] Re: benchmark yaffs with Bonnie++

Joe.C joe@numa.com.tw
Wed, 07 Jul 2004 10:11:22 +0800


This is a multi-part message in MIME format.
--------------010806050609060802040203
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



   I think the problem is in YAFFS unlink & readdir implementation.
Please see the attached test program. It should list & remove all
files in working directory. Try create/touch some file in directory
and run this program. If current directory contain >192 files, the
second readdir will not list all files.

Joe.C


--------------010806050609060802040203
Content-Type: text/plain;
 name="dirtest.c"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="dirtest.c"

CiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8c3lzL3R5cGVzLmg+CiNpbmNsdWRlIDxk
aXJlbnQuaD4KCmludCBtYWluIChpbnQgYXJnYywgY2hhciAqYXJndltdKQp7CglESVIgKmRp
cjsKCXN0cnVjdCBkaXJlbnQgKmRpcmVudDsKCglkaXIgPSBvcGVuZGlyICgiLiIpOwoJd2hp
bGUgKChkaXJlbnQgPSByZWFkZGlyIChkaXIpKSAhPSBOVUxMKSB7CgkgICAgICBpZihkaXJl
bnQtPmRfbmFtZVswXSA9PSAnLicpCgkgICAgICAJY29udGludWU7CgkJcHJpbnRmICgiZmls
ZSAlcyBleGlzdHNcbiIsIGRpcmVudC0+ZF9uYW1lKTsKCX0KCWNsb3NlZGlyIChkaXIpOwoK
CWRpciA9IG9wZW5kaXIgKCIuIik7Cgl3aGlsZSAoKGRpcmVudCA9IHJlYWRkaXIgKGRpcikp
ICE9IE5VTEwpIHsKCSAgICAgIGlmKGRpcmVudC0+ZF9uYW1lWzBdID09ICcuJykKCSAgICAg
IAljb250aW51ZTsKCQlwcmludGYgKCJyZW1vdmUgJXNcbiIsIGRpcmVudC0+ZF9uYW1lKTsK
CQl1bmxpbmsgKGRpcmVudC0+ZF9uYW1lKTsKCX0KCWNsb3NlZGlyIChkaXIpOwoKCXJldHVy
biAwOwp9Cg==
--------------010806050609060802040203--