1/*
2	Copyright 1999-2001, Be Incorporated.   All Rights Reserved.
3	This file may be used under the terms of the Be Sample Code License.
4*/
5#ifndef _DOSFS_VCACHE_H_
6#define _DOSFS_VCACHE_H_
7
8
9#include "dosfs.h"
10
11
12void dump_vcache(nspace *vol);
13
14status_t init_vcache(nspace *vol);
15status_t uninit_vcache(nspace *vol);
16
17ino_t generate_unique_vnid(nspace *vol);
18
19status_t add_to_vcache(nspace *vol, ino_t vnid, ino_t loc);
20status_t remove_from_vcache(nspace *vol, ino_t vnid);
21status_t vcache_vnid_to_loc(nspace *vol, ino_t vnid, ino_t *loc);
22status_t vcache_loc_to_vnid(nspace *vol, ino_t loc, ino_t *vnid);
23
24status_t vcache_set_entry(nspace *vol, ino_t vnid, ino_t loc);
25
26#define find_vnid_in_vcache(vol,vnid) vcache_vnid_to_loc(vol,vnid,NULL)
27#define find_loc_in_vcache(vol,loc) vcache_loc_to_vnid(vol,loc,NULL)
28
29#if DEBUG
30	int debug_dfvnid(int argc, char **argv);
31	int debug_dfloc(int argc, char **argv);
32#endif
33
34#endif
35