mirror of
https://github.com/AltraMayor/f3.git
synced 2025-09-09 15:22:40 -04:00
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.
This commit is contained in:
parent
49c7d5fc63
commit
83a9c1c87d
@ -803,6 +803,12 @@ static int bdev_usb_reset(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int bdev_none_reset(struct device *dev)
|
||||
{
|
||||
UNUSED(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bdev_free(struct device *dev)
|
||||
{
|
||||
struct block_device *bdev = dev_bdev(dev);
|
||||
@ -915,6 +921,9 @@ struct device *create_block_device(const char *filename, enum reset_type rt)
|
||||
case RT_USB:
|
||||
bdev->dev.reset = bdev_usb_reset;
|
||||
break;
|
||||
case RT_NONE:
|
||||
bdev->dev.reset = bdev_none_reset;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ struct device *create_file_device(const char *filename,
|
||||
enum reset_type {
|
||||
RT_MANUAL_USB = 0,
|
||||
RT_USB,
|
||||
RT_NONE,
|
||||
RT_MAX
|
||||
};
|
||||
#define RT_DEFAULT RT_MANUAL_USB
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <argp.h> /* For struct argp_state. */
|
||||
#include <sys/time.h> /* For struct timeval. */
|
||||
|
||||
#define UNUSED(x) ((void)x)
|
||||
|
||||
int ilog2(uint64_t x);
|
||||
|
||||
/* Least power of 2 greater than or equal to x. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user