Skip to content

Commit

Permalink
lxfs: added cache structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Oct 26, 2024
1 parent b130b7c commit 2394a86
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fs/lxfs/src/include/lxfs/lxfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
#include <sys/types.h>
#include <liblux/liblux.h>

#define CACHE_SIZE 128 /* todo: maybe don't hard code this */

typedef struct {
int valid;
uint64_t tag;
void *data;
} Cache;

typedef struct Mountpoint {
struct Mountpoint *next;
char device[MAX_FILE_PATH];
Expand All @@ -20,6 +28,8 @@ typedef struct Mountpoint {
void *blockTableBuffer; // of size blockSizeBytes
void *dataBuffer; // of size 2 * blockSizeBytes
void *meta; // metadata buffer, blockSizeBytes

Cache *cache;
} Mountpoint;

typedef struct {
Expand Down

0 comments on commit 2394a86

Please sign in to comment.