2 $Id: dircache.h,v 1.1.2.5 2010-02-11 14:13:06 franklahm Exp $
3 Copyright (c) 2010 Frank Lahm <franklahm@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
19 #include <atalk/volume.h>
20 #include <atalk/directory.h>
22 /* Maximum size of the dircache hashtable */
23 #define DEFAULT_MAX_DIRCACHE_SIZE 8192
24 #define MAX_POSSIBLE_DIRCACHE_SIZE 131072
25 #define DIRCACHE_FREE_QUANTUM 256
27 /* flags for dircache_remove */
28 #define DIRCACHE (1 << 0)
29 #define DIDNAME_INDEX (1 << 1)
30 #define QUEUE_INDEX (1 << 2)
32 extern int dircache_init(int reqsize);
33 extern int dircache_add(struct dir *);
34 extern void dircache_remove(const struct vol *, struct dir *, int flag);
35 extern struct dir *dircache_search_by_did(const struct vol *vol, cnid_t did);
36 extern struct dir *dircache_search_by_name(const struct vol *, const struct dir *dir, char *name, int len);
37 extern void dircache_dump(void);
39 #endif /* DIRCACHE_H */