314 Commits

Author SHA1 Message Date
Michel Machado
0510a6c08d Added support for Macs 2011-12-20 11:21:42 -05:00
Michel Machado
7c0be994e1 f3write now reports proper progress
In the previous version of f3write, fdatasync(2) was used to
show the progress printouts smoothly.
However, it slows down a lot the execution, and hurts
the writing speed measurement.

This new version finds out what is the writing speed of
the memory card being tested using an algorithm that reseables
TCP's congestion control algorithm, and keeps writing at that
speed; this allows smooth progress printouts.

f3write is even faster now!
2011-12-17 18:22:50 -05:00
Michel Machado
597aa0fb3c Added progress printout in f3read 2011-12-17 17:05:12 -05:00
Michel Machado
c03cbf4b4a Advising the kernel
* f3read
	As long as the kernel honors our advice, f3read doesn't
	ever read data from the system cache instead of reading
	from the memory card, and reading speed measurement  is
	improved.

* f3write
	Progress printout goes smoothly now.
2011-12-17 17:05:03 -05:00
Michel Machado
91083d787c Improved precision of speed measurements 2011-12-17 16:59:55 -05:00
Michel Machado
0135a9bfeb Improved user feedback
- Improved format of f3read's output, example:

$ ./f3read /media/F085-0201/
                     SECTORS      ok/corrupted/changed/overwritten
Validating file 0001.fff ... 2097152/        0/      0/      0
Validating file 0002.fff ... 1904000/        0/      0/      0

  Data OK: 1.91 GB (4001152 sectors)
Data LOST: 0.00 Byte (0 sectors)
	       Corrupted: 0.00 Byte (0 sectors)
	Slightly changed: 0.00 Byte (0 sectors)
	     Overwritten: 0.00 Byte (0 sectors)
Reading speed: 15.14 MB/s

- Added progress report per file to f3write.

Both suggestions were given by Michael D. Setzer II.
2011-12-17 15:52:17 -05:00
Michel Machado
d2a1a289fd Formated code following Linux's coding style
See file Documentation/CodingStyle in Linux's source code
for a reference of the style.

Used "indent -kr -i8" to help out.

Added a .gitignore to the repository.
2011-12-14 19:09:20 -05:00
Michel Machado
71cd829b9f Fixed block size bug
Nobody has reported this "bug", neither have I seen it coming out,
but I'm fixing it anyway.
It's based on Kenneth Arnold's fork of F3, which is available here:
https://github.com/kcarnold/f3

I also added a few lines in README.
2011-12-14 17:59:52 -05:00
Michel Machado
8bd4f358da Copied code from GNU Library C to improve portability
This version should compile and run on Apples, but since
I don't have one, I haven't tested it.
2011-12-14 15:48:15 -05:00
Michel Machado
572af0870e Version 1.1.3
Fixed some warning issued by GCC when compiling f3read.c on 64bits machines.
Nicolai Abruzzese was the first one to report this issue.
The outputs that he obtained were as follows:

f3read.c: In function 'report':
f3read.c:126: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has type 'uint64_t'
f3read.c: In function 'iterate_path':
f3read.c:166: warning: format '%llu' expects type 'long long unsigned int', but argument 2 has type 'uint64_t'
f3read.c:166: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'
f3read.c:166: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'uint64_t'
f3read.c:166: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has type 'uint64_t'
v1.1.3
2011-12-14 15:37:12 -05:00
Michel Machado
7d42ffabdf Version 1.1.2
Handled an I/O error reported by Misha Aizatulin.
The outputs that he obtained were as follows:

$ ./f3write /media/disk/
Free space: 122.01 GB
Creating file 0001.fff ... OK!
...
Creating file 0113.fff ... OK!
Creating file 0114.fff ... OK!
Creating file 0115.fff ... OK!
Creating file 0116.fff ... OK!
Creating file 0117.fff ... OK!
Free space: 0.00 Byte
Writing speed: 5.96 MB/s

$ ./f3read /media/disk/
                     SECTORS ok/corrupted/changed/overwritten
Validating file 0001.fff ... 0/0/0/2097152
Validating file 0002.fff ... 33280/0/0/2063872
Validating file 0003.fff ... 0/0/0/32 - NOT fully read
Validating file 0004.fff ... 0/0/0/2097152
Validating file 0005.fff ... 0/0/0/24192 - NOT fully read
Validating file 0006.fff ... 0/0/0/32 - NOT fully read
Validating file 0007.fff ... 0/0/0/32 - NOT fully read
...
Validating file 0035.fff ... 0/0/0/121984 - NOT fully read
Validating file 0036.fff ... 0/0/0/121984 - NOT fully read
Validating file 0037.fff ... 0/0/0/32 - NOT fully read
Validating file 0038.fff ... 0/0/0/32 - NOT fully read
...
Validating file 0113.fff ... 0/2097152/0/0
Validating file 0114.fff ... 0/2097152/0/0
Validating file 0115.fff ... 161888/1935264/0/0
Validating file 0116.fff ... 1980224/96768/0/20160
Validating file 0117.fff ... 265824/52416/0/0

  Data OK: 14.44 GB (30275959 sectors)
Data LOST: 13.77 GB (28874473 sectors)
               Corrupted: 9.92 GB (20793321 sectors)
        Slightly changed: 0.00 Byte (0 sectors)
             Overwritten: 3.85 GB (8081152 sectors)
WARNING: Not all data was read due to I/O error(s)
Reading speed: 15.77 MB/s
v1.1.2
2011-12-14 15:34:09 -05:00
Michel Machado
899b3c6ca7 Version 1.1.1
Fixed some warnings issued by gcc when the parameter -Wall is
used to compile the source.
v1.1.1
2011-12-14 15:32:33 -05:00
Michel Machado
45f50c10b2 Version 1.1
- Added a nice report at the end of the output of f3read.
- Fixed bug on large memory cards.
v1.1
2011-12-14 15:28:46 -05:00
Michel Machado
48195690db The very first version of F3 (version 1.0)
It doesn't have a nice report, and due to a bug, only works properly on
2GB cards or less.
v1.0
2011-12-14 15:24:43 -05:00