Coda Distributed File System
local.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 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 _LOCAL_H_
20#define _LOCAL_H_ 1
21
22/* from util */
23#include <dlist.h>
24#include <rec_dlist.h>
25
26/* from venus */
27#include "fso.h"
28#include "venusvol.h"
29#include <lwp/lock.h>
30
31/* below are methods for repair local subtrees */
32void DiscardLocalMutation(repvol *, char *); /*?*/
33void PreserveLocalMutation(char *); /*N*/
34void PreserveAllLocalMutation(char *); /*N*/
35void ListCML(VenusFid *, FILE *); /*U*/
36
37/* class for a dir entry used for process uncached children
38 (Satya, 8/12/96): had to change the name from dirent to
39 vdirent to prevent name clash with sys/dirent.h in BSD44
40*/
41class vdirent : public dlink {
42 VenusFid fid;
43 char name[CODA_MAXNAMLEN + 1];
44
45public:
46 vdirent(VenusFid *, char *);
49 char *GetName();
50
51 void print(FILE *);
52 void print();
53 void print(int);
54};
55
57public:
60};
61
62/* class for fsobj object-pointer */
63class optent : public dlink {
64 fsobj *obj;
65 int tag;
66
67public:
71 void SetTag(int);
72 int GetTag();
73
74 void print(FILE *);
75 void print();
76 void print(int);
77};
78
80public:
83};
84
85/* class for repvol object-pointer */
86class vptent : public dlink {
87 repvol *vpt;
88
89public:
93
94 void print(FILE *);
95 void print();
96 void print(int);
97};
98
100public:
103};
104
105/*
106 * constants for local mutation integrity check.
107 * VV_CONFLICT: means version vector conflict.
108 * NN_CONFLICT: means name/name conflict.
109 * RU_CONFLICT: means remove(client)/update(server) conflict.
110 */
111#define MUTATION_MISS_TARGET 0x1
112#define MUTATION_MISS_PARENT 0x2
113#define MUTATION_ACL_FAILURE 0x4
114#define MUTATION_VV_CONFLICT 0x8
115#define MUTATION_NN_CONFLICT 0x10
116#define MUTATION_RU_CONFLICT 0x20
117
118/* constants for local repair option */
119#define REPAIR_FAILURE 0x1
120#define REPAIR_OVER_WRITE 0x2
121#define REPAIR_FORCE_REMOVE 0x4
122
123/* constant for the initial value of repair transaction-id number generator */
124#define REP_INIT_TID 1000000
125
126/* object-based debug macro */
127#define OBJ_ASSERT(o, ex) \
128 { \
129 if (!(ex)) { \
130 (o)->print(logFile); \
131 CHOKE("Assertion failed: file \"%s\", line %d\n", __FILE__, \
132 __LINE__); \
133 } \
134 }
135
136#endif /* _LOCAL_H_ */
Definition: local.h:56
vdirent * operator()()
dir_iterator(dlist &)
Definition: dlist.h:80
Definition: dlist.h:50
Definition: fso.h:343
Definition: local.h:79
optent * operator()()
opt_iterator(dlist &)
Definition: local.h:63
int GetTag()
void print()
void print(int)
fsobj * GetFso()
void SetTag(int)
void print(FILE *)
optent(fsobj *)
Definition: venusvol.h:931
Definition: local.h:41
void print(FILE *)
VenusFid * GetFid()
void print()
void print(int)
char * GetName()
vdirent(VenusFid *, char *)
Definition: local.h:99
vptent * operator()()
vpt_iterator(dlist &)
Definition: local.h:86
void print(FILE *)
void print(int)
vptent(repvol *)
void print()
repvol * GetVol()
#define CODA_MAXNAMLEN
Definition: coda.h:114
void ListCML(VenusFid *, FILE *)
void DiscardLocalMutation(repvol *, char *)
void PreserveLocalMutation(char *)
void PreserveAllLocalMutation(char *)
Definition: venusfid.h:24