This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The performance issue of FAT16 file system?


Hello, Nick Garnett,

Thank you very much for your help and sorry for the in-complete trouble report.

The FAT16 fileio1 test result is a bit "strange". First, If the CF card has no /disk2 directory, then the 
    err = chdir( "." ); at line 586 of fileio1.c will fail with returned value -1:

<INFO>: mkdir disk2     // Here, I've changed the mount() method to make dir, for we just have one partition on the CF disk.
<INFO>: reading directory /disk2
<INFO>: entry              . [mode 00000001 ino 0000014b nlink 1 size 0]
<INFO>: entry             .. [mode 00000001 ino 00000000 nlink 1 size 0]
<INFO>: create file /disk2/tinky size 4567
<INFO>: copy file /disk2/tinky -> /disk2/laalaa
<INFO>: check file /disk2/tinky
<INFO>: check file /disk2/laalaa
<INFO>: compare files /disk2/tinky == /disk2/laalaa
<INFO>: cd /disk2
<INFO>: mkdir noonoo
<INFO>: reading directory /disk2
<INFO>: entry              . [mode 00000001 ino 0000014b nlink 1 size 0]
<INFO>: entry             .. [mode 00000001 ino 00000000 nlink 1 size 0]
<INFO>: entry          TINKY [mode 00000008 ino 0000014c nlink 1 size 4567]
<INFO>: entry         LAALAA [mode 00000008 ino 0000014d nlink 1 size 4567]
<INFO>: entry         NOONOO [mode 00000001 ino 0000014e nlink 1 size 0]
<INFO>: cd noonoo
<INFO>: create file tinky size 6789
<INFO>: check file tinky
<INFO>: create file dipsy size 34567
<INFO>: check file dipsy
<INFO>: copy file dipsy -> po
<INFO>: check file po
<INFO>: compare files dipsy == po
<INFO>: reading directory .
<INFO>: entry              . [mode 00000001 ino 0000014e nlink 1 size 0]
<INFO>: entry             .. [mode 00000001 ino 0000014b nlink 1 size 0]
<INFO>: entry          TINKY [mode 00000008 ino 0000014f nlink 1 size 6789]
<INFO>: entry          DIPSY [mode 00000008 ino 00000150 nlink 1 size 34567]
<INFO>: entry             PO [mode 00000008 ino 00000159 nlink 1 size 34567]
<INFO>: reading directory 
<INFO>: entry              . [mode 00000001 ino 0000014e nlink 1 size 0]
<INFO>: entry             .. [mode 00000001 ino 0000014b nlink 1 size 0]
<INFO>: entry          TINKY [mode 00000008 ino 0000014f nlink 1 size 6789]
<INFO>: entry          DIPSY [mode 00000008 ino 00000150 nlink 1 size 34567]
<INFO>: entry             PO [mode 00000008 ino 00000159 nlink 1 size 34567]
<INFO>: reading directory ..
<INFO>: entry              . [mode 00000001 ino 0000014b nlink 1 size 0]
<INFO>: entry             .. [mode 00000001 ino 00000000 nlink 1 size 0]
<INFO>: entry          TINKY [mode 00000008 ino 0000014c nlink 1 size 4567]
<INFO>: entry         LAALAA [mode 00000008 ino 0000014d nlink 1 size 4567]
<INFO>: entry         NOONOO [mode 00000001 ino 0000014e nlink 1 size 0]
<INFO>: unlink tinky
<INFO>: unlink dipsy
<INFO>: unlink po
<INFO>: cd ..
<INFO>: rmdir noonoo
<INFO>: cd /disk2/x/y/z/w
<INFO>: cd ..
<INFO>: cd .
<FAIL>: chdir() returned -1 No such entity						// here the chdir(".") fails
<INFO>: cd ../../y												// the subsequent test fails too, it seems that's caused by chdir(".") failure.
<FAIL>: chdir() returned -1 No such entity
cwdbuf /disk2/x/y/z cwd /disk2/x/y
FAIL:<Current directory mismatch> Line: 402, File: /home/james/ecos/packages/fs/fat/current/tests/fileio1.c
<INFO>: cd ../..
<FAIL>: chdir() returned -1 No such entity
cwdbuf /disk2/x/y/z cwd /disk2
FAIL:<Current directory mismatch> Line: 402, File: /home/james/ecos/packages/fs/fat/current/tests/fileio1.c
<INFO>: rmdir x/y/z/w
<FAIL>: rmdir() returned -1 No such entity
<INFO>: rmdir x/y/z
<FAIL>: rmdir() returned -1 No such entity
<INFO>: rmdir x/y
<FAIL>: rmdir() returned -1 No such entity
<INFO>: rmdir x
<FAIL>: rmdir() returned -1 No such entity
cwdbuf /disk2/x/y/z cwd /disk2
FAIL:<Current directory mismatch> Line: 402, File: /home/james/ecos/packages/fs/fat/current/tests/fileio1.c
<INFO>: unlink tinky
<FAIL>: unlink() returned -1 No such entity
<INFO>: unlink laalaa
<FAIL>: unlink() returned -1 No such entity	
<INFO>: cd /
<INFO>: reading directory /disk2
<INFO>: entry              . [mode 00000001 ino 0000014b nlink 1 size 0]
<INFO>: entry             .. [mode 00000001 ino 00000000 nlink 1 size 0]
<INFO>: entry          TINKY [mode 00000008 ino 0000014c nlink 1 size 4567]
<INFO>: entry         LAALAA [mode 00000008 ino 0000014d nlink 1 size 4567]
<INFO>: entry              X [mode 00000001 ino 0000014e nlink 1 size 0]
<INFO>: rmdir dir
<FAIL>: rmdir() returned -1 Not permitted						// Yes, it's correct, since the directory is not empty.


Secondly, If the CF card has  /disk2 directory, then the 
    err = chdir( "." ); at line 586 of fileio1.c will function correctly! Though the mkdir("x"), mkdir("x/y")... will fail since the file already exists. Here are the test results:

<FAIL>: mkdir() returned -1 File exists							// Yes, It's correct, directory exists
<FAIL>: mkdir() returned -1 File exists							// Yes, It's correct, directory exists
<FAIL>: mkdir() returned -1 File exists							// Yes, It's correct, directory exists
<FAIL>: mkdir() returned -1 File exists							// Yes, It's correct, directory exists
<INFO>: cd /disk2/x/y/z/w
<INFO>: cd ..
<INFO>: cd .													// Here, chdir(".") functions well!
<INFO>: cd ../../y
<INFO>: cd ../..
<INFO>: rmdir x/y/z/w
<INFO>: rmdir x/y/z
<INFO>: rmdir x/y
<INFO>: rmdir x
<INFO>: unlink tinky
<INFO>: unlink laalaa
<INFO>: cd /
<INFO>: reading directory /disk2
<INFO>: entry              . [mode 00000001 ino 0000014b nlink 1 size 0]
<INFO>: entry             .. [mode 00000001 ino 00000000 nlink 1 size 0]
<INFO>: rmdir dir

As to the performance of file writting, YOU ARE absolutely CORRECT! I've adjusted the cache size, it did the
point at which thrashing occurs. 

Best regards.				 
James Jiao
jiaoxf@hellocq.net
2004-02-22




-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]