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
26 /* flags for dircache_remove */
27 #define DIRCACHE (1 << 0)
28 #define DIDNAME_INDEX (1 << 1)
29 #define QUEUE_INDEX (1 << 2)
31 extern int dircache_init(int reqsize);
32 extern int dircache_add(struct dir *);
33 extern void dircache_remove(const struct vol *, struct dir *, int flag);
34 extern struct dir *dircache_search_by_did(const struct vol *vol, cnid_t did);
35 extern struct dir *dircache_search_by_name(const struct vol *, const struct dir *dir, char *name, int len);
36 extern void dircache_dump(void);
38 #endif /* DIRCACHE_H */