18 Commits

Author SHA1 Message Date
Michel Machado
3d04fc7b55 f3probe: change default reset to --reset-type=1 2015-11-14 09:33:19 -05:00
Michel Machado
fe4e9dd2e7 f3probe: speed up writing and reading
This patch takes advantage of the new interface of struct device
to write and read sequential blocks with a single call.
2015-11-13 11:14:36 -05:00
Michel Machado
067802ca5a f3brew: speed up writing and reading
This patch changes the interface of struct device to allow
writes and reads of sequential blocks with a single call.
2015-11-13 09:09:33 -05:00
Michel Machado
3f0efeb12f f3probe/f3brew: add cache to the model
F3 users have identified fake flashes that reserve a portion of
their good memory to use as a permanent cache.
This patch adds this feature to our model in order to allow us to
develop a new probe algorithm to deal with it.
2015-11-12 09:55:39 -05:00
Michel Machado
246011f053 f3brew: work at block level
f3brew were working at sector level because
it was borrowing code from f3write/f3read which work at that level.
This patch writes new functions to fill out, and validate blocks.

This change is important because
f3probe needs to validate blocks as well for its coming features.

A side effect of this patch is that all experimental applications
(i.e. f3probe, f3brew, and f3fix) no longer depend on
code from f3write and f3read.
2015-11-04 16:41:04 -05:00
Michel Machado
add20ef7ae f3brew: test if device moved after reset
Devices might change their names after a reset.
This patch simply adds the same warning that
f3probe already has to f3brew.
2015-11-03 12:55:30 -05:00
Michel Machado
c47a7642fb f3brew: handle lack of access right
When a non-root user called f3brew on a device,
f3brew would issue the following error message:

Your username doesn't have access to device `/dev/sdc'.
Try to run this program as root:
sudo f3probe /dev/sdc
In case you don't have access to root, use f3write/f3read.
f3brew: f3brew.c:484: main: Assertion `dev' failed.
Aborted (core dumped)

This patch avoids the assert().
2015-11-03 12:43:03 -05:00
Michel Machado
8305e5ad5f f3brew: add block size information
Not only does f3brew list block size, but f3brew also uses
this information to better report results.
2015-11-03 09:06:23 -05:00
Michel Machado
795424c873 f3brew: make output easier to read
The results are grouped, so the output is not too verbose.
2015-10-09 16:43:09 -04:00
Michel Machado
c77db3d9e0 f3brew: fixed bugs
f3brew were inverting the semantic of parameter --debug, and
it was calculating a wrong last block for drives.
2015-10-09 14:41:23 -04:00
Michel Machado
bcf71585a8 f3brew: add --do-not-write and --do-not-read
These new options help with writing scripts and repeating tests.
2015-09-02 10:43:36 -04:00
Michel Machado
4b7d35951f f3brew: accept parameters from prompt 2015-09-02 10:43:36 -04:00
Michel Machado
902db294ef f3probe: align buffers with devices' block sizes
This patch should address issue discussed here:
https://github.com/AltraMayor/f3/issues/13

Reported-by: Dingyuan Wang
2015-02-14 10:36:07 -05:00
Michel Machado
4f13815dfc f3probe: use physical block size
f3probe was using a kernel-recommended logical block size.
This patch allows f3probe to always find
the last good physical block of devices.

This patch also renames option --block-order to --debug-block-order
since f3probe detects the physical block size of devices.
2015-02-14 09:56:04 -05:00
Michel Machado
f8797d8b7c Minor fixes 2014-12-23 11:12:37 -03:00
Michel Machado
d603f2e90a f3probe: rebrand --debug-block-order to --block-order
The new parameter allows users to test drives with
forced block sizes.

This parameter is only meant to help testing drives whose
*real* sizes are not multiples of their block sizes;
this should be rather rare!
2014-12-17 11:15:15 -05:00
Michel Machado
91a291374c make f3brew (barely) work 2014-10-10 14:24:38 -04:00
Michel Machado
751b5a609f add f3brew (experimental)
f3brew, f3 block read write, tests block devices
writing and reading blocks directly to devices.

This is a not-functional version of f3brew.
The main contribution of this patch is to reorganize libprobe.{h,c},
so f3brew, and any future application, can reuse the library.
2014-10-10 09:54:39 -04:00