shithub: neoventi

ref: d42b5ae9b1b41d92fb88cffa6bdb930c2b476570
dir: /partitioner/partitioner.h/

View raw version
typedef struct {
	char *path;
	int fd;
	size_t offset, size;
	enum { unknown, bad, disk, part, file } type;
	enum { undecided, none, arena, index, bloom, indexbloom, fossil } use;
	/* Random read latency; unit: average microseconds to read one 512-byte block */
	uint32_t randlatency;
	/* Sequential read speed; unit: MiB/s when reading 4K blocks */
	uint32_t seqspeed;
	/* The number of drives that must fail to bring down this region */
	uint16_t redundancy;
	/* The reason the region is being used the way it is */
	char *why;
	/* device-specific unique identifier */
	char *uuid;
} Region;

enum{
	/* Minimum size for a partition to be considered for usage */
	MinSize = 16 * 1024 * 1024,
};

void proberegiontype(Region *r);
void proberegionredundancy(Region *r);