]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/dircache.h
CNID fallback for dbd backend, from branch-2-1
[netatalk.git] / etc / afpd / dircache.h
1 /*
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>
4
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.
9  
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.
14  */
15
16 #ifndef DIRCACHE_H 
17 #define DIRCACHE_H
18
19 #include <atalk/volume.h>
20 #include <atalk/directory.h>
21
22 /* Maximum size of the dircache hashtable */
23 #define DEFAULT_MAX_DIRCACHE_SIZE 8192
24 #define MAX_POSSIBLE_DIRCACHE_SIZE 131072
25
26 /* flags for dircache_remove */
27 #define DIRCACHE      (1 << 0)
28 #define DIDNAME_INDEX (1 << 1)
29 #define QUEUE_INDEX   (1 << 2)
30
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);
37
38 #endif /* DIRCACHE_H */