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-17 01:20:20 +01:00
|
|
|
char* backing_file;
|
2024-02-18 14:56:36 +01:00
|
|
|
char* backing_identifier;
|
2024-02-17 01:20:20 +01:00
|
|
|
} DiskInfo;
|
|
|
|
|
2024-02-17 23:59:38 +01:00
|
|
|
Status CreateRootDisk(const char* path, uint64_t disk_size);
|
|
|
|
Status CreateBackedDisk(const char* path, const char* backing_file);
|
2024-02-17 01:20:20 +01:00
|
|
|
|
2024-02-17 23:59:38 +01:00
|
|
|
Status TrimDisk(const char* path);
|
|
|
|
Status RebaseDisk(const char* path, const char* backing_file);
|
2024-02-17 01:20:20 +01:00
|
|
|
|
2024-02-17 23:59:38 +01:00
|
|
|
Status GetDiskInfo(const char* path, DiskInfo* _info);
|
2024-02-18 14:56:36 +01:00
|
|
|
void FreeDiskInfo(DiskInfo* info);
|