-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcache.h
More file actions
26 lines (20 loc) · 783 Bytes
/
cache.h
File metadata and controls
26 lines (20 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
* copyfs - copy on write filesystem http://n0x.org/copyfs/
* Copyright (C) 2004 Nicolas Vigier <boklm@mars-attacks.org>
* Thomas Joubert <widan@net-42.eu.org>
* This program can be distributed under the terms of the GNU GPL.
* See the file COPYING.
*/
#ifndef CACHE_H
# define CACHE_H
# include "structs.h"
# define CACHE_SIZE 256 /* low for testing */
# define CACHE_HASH_BUCKETS 128
# define CACHE_HASH(x) (helper_hash_string((x)) % (CACHE_HASH_BUCKETS))
void cache_initialize(void);
void cache_finalize(void);
metadata_t *cache_get_metadata(const char *vpath);
void cache_add_metadata(metadata_t *metadata);
void cache_drop_metadata(const char *vpath);
int cache_find_maximal_match(char **array, metadata_t **result);
#endif /* !CACHE_H */