2024-02-17 00:57:30 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
|
2024-02-17 01:20:20 +01:00
|
|
|
typedef struct {
|
2024-02-17 23:59:38 +01:00
|
|
|
uint64_t size;
|
|
|
|
uint64_t allocated;
|
2024-02-19 16:01:53 +01:00
|
|
|
char* backing_path;
|
|
|
|
} disk_info_t;
|
2024-02-17 01:20:20 +01:00
|
|
|
|
2024-02-19 16:01:53 +01:00
|
|
|
result_t create_root_disk(const char* path, uint64_t size);
|
|
|
|
result_t create_backed_disk(const char* path, const char* backing_path);
|
2024-02-17 01:20:20 +01:00
|
|
|
|
2024-02-19 16:01:53 +01:00
|
|
|
result_t trim_disk(const char* path);
|
|
|
|
result_t reset_disk(const char* path);
|
|
|
|
result_t reback_disk(const char* path, const char* backing_path);
|
|
|
|
|
|
|
|
result_t get_disk_info(disk_info_t* _info, const char* path);
|
|
|
|
void free_disk_info(disk_info_t* _info);
|