mail-cache-private.h revision e96fb85799dc95603bb1a6b4d3685df2d042a2f8
1e185b8192422bc09cb7f52f80a4c40d9b935535Julian Kornberger/* Never compress the file if it's smaller than this */
efb1071fa215623a140a608a5f224da94f720af5Eileen Bolloff/* Don't bother remembering holes smaller than this */
11e3e71d0daa6ae89049b081d7d8d1de91873a7dEileen Bolloff/* Compress the file when deleted space reaches n% of total size */
11e3e71d0daa6ae89049b081d7d8d1de91873a7dEileen Bolloff/* Compress the file when n% of rows contain continued rows.
11e3e71d0daa6ae89049b081d7d8d1de91873a7dEileen Bolloff 200% means that there's 2 continued rows per record. */
11e3e71d0daa6ae89049b081d7d8d1de91873a7dEileen Bolloff/* Initial size for the file */
11e3e71d0daa6ae89049b081d7d8d1de91873a7dEileen Bolloff#define MAIL_CACHE_INITIAL_SIZE (sizeof(struct mail_cache_header) + 10240)
11e3e71d0daa6ae89049b081d7d8d1de91873a7dEileen Bolloff/* When more space is needed, grow the file n% larger than the previous size */
9963324f3e14d98ebea29a2917af2abf7e89e96bJulian Kornberger/* When allocating space for transactions, don't use blocks larger than this. */
ee5342a8882c2fc7631fcffb5497e6597747887cTim Reddehase#define MAIL_CACHE_MAX_RESERVED_BLOCK_SIZE (1024*512)
struct mail_cache_header {
struct mail_cache_header_fields {
#define MAIL_CACHE_FIELD_LAST_USED() \
struct mail_cache_record {
struct mail_cache_hole_header {
struct mail_cache_field_private {
struct mail_cache {
char *filepath;
int fd;
void *mmap_base;
unsigned int fields_count;
unsigned int *file_field_map;
unsigned int file_fields_count;
struct mail_cache_view {
void *context);
struct mail_cache_record *
const char *function);