15#ifndef CARDSIGHT_STORAGE_PROXY_LAZY_H
16#define CARDSIGHT_STORAGE_PROXY_LAZY_H
150 const char *path),
void *context);
161#ifdef STORAGE_PROXY_HOST_TEST
173void storage_proxy_lazy_test_limits(uint32_t cache_entries, uint32_t cache_bytes,
174 uint32_t dir_max_entries);
179struct storage_proxy_lazy_test_stats {
181 uint32_t pending_sectors;
183 uint32_t active_runs;
185 uint64_t staged_sectors;
193void storage_proxy_lazy_test_stats(
struct storage_proxy_lazy_test_stats *stats);
void storage_proxy_lazy_set_progress(void(*callback)(void *context, uint32_t entries, const char *path), void *context)
Install a directory indexing progress callback.
const char * storage_proxy_lazy_device_name(void)
Return the block device name the lazy view is registered under.
uint32_t storage_proxy_lazy_cache_evictions(void)
Return the number of entry caches evicted since start.
bool storage_proxy_lazy_truncated(void)
Report whether any index limit made part of the source tree invisible.
uint32_t storage_proxy_lazy_cached_bytes(void)
Return the number of bytes the directory entry caches currently hold.
void storage_proxy_lazy_stop(void)
Stop the lazy view and release everything it holds.
void storage_proxy_lazy_cache_drop(void)
Drop every cached directory entry, keeping extents and the overlay.
int storage_proxy_lazy_layout(struct storage_proxy_lazy_layout *layout)
Copy the geometry and reservation regions of the running view.
uint32_t storage_proxy_lazy_cached_entries(void)
Return the number of directory entries currently cached.
void storage_proxy_lazy_cancel(void)
Ask a running directory count or load to stop at its next check.
size_t storage_proxy_lazy_directory_count(void)
Return the number of source directories the view has indexed.
bool storage_proxy_lazy_running(void)
Report whether the lazy view is registered as a block device.
int storage_proxy_lazy_start(const char *source_disk, uint32_t selected_partitions)
Start the lazy view over selected partitions of a disk.
Public interface of the exFAT proxy view.
#define STORAGE_PROXY_MAX_PARTITIONS
Number of source partitions the view can expose.
Definition storage_proxy.h:19
Geometry and reservation regions of a running lazy view.
Definition proxy_lazy.h:27
uint32_t cluster_bytes
Size of one view cluster in bytes.
Definition proxy_lazy.h:31
uint32_t bitmap_cluster
First cluster of the allocation bitmap.
Definition proxy_lazy.h:35
uint32_t total_clusters
Number of clusters in the view.
Definition proxy_lazy.h:29
uint32_t bitmap_bytes
Useful bytes of the allocation bitmap.
Definition proxy_lazy.h:37
uint32_t data_start
First sector of cluster two.
Definition proxy_lazy.h:33
uint32_t reserve_first[STORAGE_PROXY_MAX_PARTITIONS]
First cluster reserved for each selected partition.
Definition proxy_lazy.h:47
uint32_t root_cluster
First cluster of the synthesized root directory.
Definition proxy_lazy.h:39
bool selected[STORAGE_PROXY_MAX_PARTITIONS]
True when the partition was selected for the view.
Definition proxy_lazy.h:55
uint32_t reserve_clusters[STORAGE_PROXY_MAX_PARTITIONS]
Number of clusters reserved for each selected partition.
Definition proxy_lazy.h:49
uint32_t tail_clusters
Number of free clusters the host sees as the tail.
Definition proxy_lazy.h:45
uint32_t root_clusters
Number of clusters the root directory spans.
Definition proxy_lazy.h:41
uint32_t tail_first
First free cluster after every reservation.
Definition proxy_lazy.h:43
uint32_t partition_root_clusters[STORAGE_PROXY_MAX_PARTITIONS]
Number of clusters a partition's view folder spans, or zero before it is indexed.
Definition proxy_lazy.h:53
uint32_t partition_root_first[STORAGE_PROXY_MAX_PARTITIONS]
First cluster of a partition's view folder, or zero before it is indexed.
Definition proxy_lazy.h:51