Coda Distributed File System
index.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 8
5
6 Copyright (c) 1987-2021 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifndef _INDEX_H_
20#define _INDEX_H_ 1
21
22class vindex {
23 friend class vindex_iterator;
24 Device unix_dev;
25 VolumeId vol_id; /* unique volume id of object's volume */
26 int vol_index; /* index of object's volume in recoverable storage */
27 int vtype; /* vLarge (= 0) or vSmall (= 1) (from cvnode.h) */
28 int camindex;
29
30public:
31 vindex(VolumeId volid = -1, int vnodetype = -1, Device dev = -1,
32 int size = -1, int volindex = -1);
34 ~vindex();
35 int elts();
36 int vnodes();
37 int IsEmpty(VnodeId);
38 int get(VnodeId, Unique_t, VnodeDiskObject *);
39 int oget(bit32, Unique_t, VnodeDiskObject *);
40 int put(VnodeId, Unique_t, VnodeDiskObject *) REQUIRES_TRANSACTION;
42};
43
45 vindex *v_ind;
46 rec_smolist *vlists;
47 int clist;
48 int nlists;
49 rec_smolist_iterator *nextlink;
50
51public:
55};
56
57#endif /* _INDEX_H_ */
Definition: rec_smolist.h:86
Definition: rec_smolist.h:65
Definition: index.h:44
~vindex_iterator()
Definition: index.cc:153
vindex_iterator(vindex &)
Definition: index.cc:141
int operator()(VnodeDiskObject *)
Definition: index.cc:163
Definition: index.h:22
int get(VnodeId, Unique_t, VnodeDiskObject *)
Definition: index.cc:112
int IsEmpty(VnodeId)
Definition: index.cc:101
int put(VnodeId, Unique_t, VnodeDiskObject *) REQUIRES_TRANSACTION
Definition: index.cc:126
int oget(bit32, Unique_t, VnodeDiskObject *)
Definition: index.cc:119
~vindex()
Definition: index.cc:139
vindex(VolumeId volid=-1, int vnodetype=-1, Device dev=-1, int size=-1, int volindex=-1)
Definition: index.cc:59
int operator=(vindex &)
int vnodes()
Definition: index.cc:95
int elts()
Definition: index.cc:89
int oput(bit32, Unique_t, VnodeDiskObject *) REQUIRES_TRANSACTION
Definition: index.cc:133
#define REQUIRES_TRANSACTION
Definition: coda_tsa.h:107
Definition: cvnode.h:98
uint32_t bit32
Definition: voltypes.h:56
bit32 Device
Definition: voltypes.h:60