<commit_before>#include <stdint.h>
#include "map.h"

#define BLOCK_MAP_SIZE 1024
#define LOG_MAP_SIZE 64
#define SNAPSHOT_MAP_SIZE 64

typedef char* page_t;
typedef struct log log_t;
typedef struct block block_t;
typedef struct snapshot_block snapshot_block_t;
typedef struct filesystem filesystem_t;
typedef struct snapshot snapshot_t;

MAP_DECLARE(block, block_t);
MAP_DECLARE(log, uint64_t);
MAP_DECLARE(snapshot, snapshot_t);

enum OPERATION {
  BOL,
  CREATE_BLOCK,
  DELETE_BLOCK,
  WRITE
};

enum STATUS {
  ACTIVE,
  NON_ACTIVE
};

struct log {
  uint32_t op : 4;
  uint32_t block_length : 28;
  uint32_t start_page;
  uint32_t nr_pages;
  uint64_t r;
  uint64_t l;
  uint64_t u; // user timestamp
  page_t pages;
};

struct block {
  uint64_t id;
  uint64_t log_length;
  uint64_t log_cap;
  uint32_t status : 4;
  uint32_t length : 28;
  uint32_t pages_cap;
  page_t *pages;
  log_t *log;
  MAP_TYPE(log) *log_map_hlc; // by hlc
  MAP_TYPE(log) *log_map_ut; // by user timestamp
  MAP_TYPE(snapshot) *snapshot_map;
};

struct snapshot {
  uint64_t ref_count;
  uint32_t status : 4;
  uint32_t length : 28;
  page_t *pages;
};

struct filesystem {
  size_t block_size;
  size_t page_size;
  MAP_TYPE(block) *block_map;
};

#ifdef DEBUG
#define DEBUG_PRINT(arg,fmt...) {fprintf(stdout,arg, ##fmt );fflush(stdout);}
#else
#define DEBUG_PRINT(arg,fmt...)
#endif
<commit_msg>Removed depricated type.<commit_after>#include <stdint.h>
#include "map.h"

#define BLOCK_MAP_SIZE 1024
#define LOG_MAP_SIZE 64
#define SNAPSHOT_MAP_SIZE 64

typedef char* page_t;
typedef struct log log_t;
typedef struct block block_t;
typedef struct filesystem filesystem_t;
typedef struct snapshot snapshot_t;

MAP_DECLARE(block, block_t);
MAP_DECLARE(log, uint64_t);
MAP_DECLARE(snapshot, snapshot_t);

enum OPERATION {
  BOL,
  CREATE_BLOCK,
  DELETE_BLOCK,
  WRITE
};

enum STATUS {
  ACTIVE,
  NON_ACTIVE
};

struct log {
  uint32_t op : 4;
  uint32_t block_length : 28;
  uint32_t start_page;
  uint32_t nr_pages;
  uint64_t r;
  uint64_t l;
  uint64_t u; // user timestamp
  page_t pages;
};

struct block {
  uint64_t id;
  uint64_t log_length;
  uint64_t log_cap;
  uint32_t status : 4;
  uint32_t length : 28;
  uint32_t pages_cap;
  page_t *pages;
  log_t *log;
  MAP_TYPE(log) *log_map_hlc; // by hlc
  MAP_TYPE(log) *log_map_ut; // by user timestamp
  MAP_TYPE(snapshot) *snapshot_map;
};

struct snapshot {
  uint64_t ref_count;
  uint32_t status : 4;
  uint32_t length : 28;
  page_t *pages;
};

struct filesystem {
  size_t block_size;
  size_t page_size;
  MAP_TYPE(block) *block_map;
};

#ifdef DEBUG
#define DEBUG_PRINT(arg,fmt...) {fprintf(stdout,arg, ##fmt );fflush(stdout);}
#else
#define DEBUG_PRINT(arg,fmt...)
#endif

{'fraction_non_alphanumeric': 0.10062431142122659, 'fraction_numerical': 0.0374586852735953, 'mean_word_length': 4.559183673469388, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5887182', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1085, 'n_words': 270}