15 Commits

Author SHA1 Message Date
a1346054
0d3215a10b fix spelling 2021-08-25 13:23:06 +00:00
Michel Machado
1a576cb6dc f3probe: speed up non-destructive mode
This patch makes f3probe issue single calls of
sequential reads and writes wherever is possible to speed up
the non-destructive (i.e. conservative) mode.

Notice that the non-destructive mode only recovers the usable
blocks of fake drives, and all blocks of legit drives.
2015-11-17 16:51:29 -05:00
Michel Machado
3d04fc7b55 f3probe: change default reset to --reset-type=1 2015-11-14 09:33:19 -05:00
Michel Machado
83a9c1c87d f3probe/f3brew: add --reset-type=2
Reset type 2 does not reset, that is, it does nothing.
This parameter is only helpful to study the effects of cache on
the F3 algorithms.
2015-11-14 08:38:33 -05:00
Michel Machado
e3fe7a006d f3probe: fix allocation error of safe device
probe_device_max_blocks() was returning an int that once multiplied
by block_size was out range.
This patch just enforces probe_device_max_blocks() to return
an uint64_t, and does the needed adjustments in the code.
2015-11-13 14:40:43 -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
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
6fbe096089 f3probe: report if the device changes its filename
Due to the resets, the device might move its filename.
For example, from `/dev/sdb' to `/dev/sdc'.
2014-12-24 10:54:44 -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
783ef37213 f3probe: drop old manual reset
The code of the old manual reset couldn't handle the case of
the drive changing its filename, i.e. "/dev/sdb" becomes
"/dev/sdc" after the drive is unplugged and plugged back.

Not only this is a bug, in the rare case the user is
testing multiple drives at the same time, this would lead
to bad behavior.
2014-12-17 06:41:37 -05:00
Michel Machado
12b44e1068 f3probe: add semiautomatic reset method
This new reset method monitors the USB subsytem to know
when the drive was unplugged and when it was plugged back
to continue instead of waiting for a key to be pressed after
those actions.

The following URLs were very useful to implement this patch:

http://www.signal11.us/oss/udev/
http://www.freedesktop.org/software/systemd/libudev/
2014-12-17 06:32:30 -05:00
Michel Machado
fb8c784670 f3probe: make it more uniform to add reset methods 2014-12-16 12:01:52 -05: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