24#define _VENUS_HDB_H_ 1
43#define HDB_ASSERT(ex) \
46 CHOKE("Assertion failed: file \"%s\", line %d\n", __FILE__, \
59#define H_DESCENDENTS \
141#define HDB (rvg->recov_HDB)
142const int HDB_MagicNumber = 5551212;
143const int HDB_NBUCKETS = 2048;
144const int HDBENT_MagicNumber = 8204933;
145const int HDBMaxFreeEntries = 32;
176 friend class hdb_iterator;
177 friend class namectxt;
195 long TimeOfLastDemandWalk;
196 int NumHoardWalkAdvice;
201 void operator delete(
void *);
203 void ResetTransient();
207 hdbent *
Create(VolumeId,
char *realm,
char *
name, uid_t,
int,
int,
211 hdbent *
Find(VolumeId,
char *realm,
char *
name);
223 void ResetUser(uid_t);
227 void ListPriorityQueue();
229 int CalculateTotalBytesToFetch();
232 void PostWalkStatus();
235 void SetSolicitAdvice(
int uid)
237 LOG(0, (
"SetSolicitAdvice: uid=%d\n",
uid));
242 long GetDemandWalkTime();
244 void print() { print(
stdout); }
250 void print(
int,
int = 0);
259 hdb_key(VolumeId,
char *realm,
char *
name);
265 friend class hdb_iterator;
278 unsigned expand_children : 1;
279 unsigned expand_descendents : 1;
291 void operator delete(
void *);
301 void printsuspect(
int,
int);
310 hdb_iterator(hdb_key *);
326 friend class hdb_iterator;
329 friend void NotifyUsersOfKillEvent(
dlist *,
int);
341 unsigned demote_pending : 1;
344 unsigned expand_children : 1;
346 expand_descendents : 1;
348 unsigned random : 16;
355 ViceVersionVector expander_vv;
356 unsigned long expander_dv;
369 void Transit(
enum pestate);
376 void *operator new(
size_t);
377 namectxt(
VenusFid *,
char *, uid_t,
int,
int,
int);
378 namectxt(namectxt *,
char *);
379 namectxt(namectxt &);
380 int operator=(namectxt &);
382 void operator delete(
void *);
385 Demote(
int recursive =
387 void CheckComponent(
fsobj *);
389 int GetPriority() {
return (priority); }
390 uid_t GetUid() {
return (
uid); }
392 void print(
void * = 0) { print(
stdout); }
393 void print(FILE *fp,
void * = 0)
398 void print(
int,
void * = 0);
399 void printsuspect(
int,
int);
400 void getpath(
char *);
401 void putmsg(
int fd,
const char *reason,
int include_modifier);
406extern int NameCtxt_allocs;
407extern int NameCtxt_deallocs;
427#define PRINT_HDBDREQTYPE(type) \
428 ((type) == HdbAdd ? "Add" : \
429 (type) == HdbDelete ? "Delete" : \
430 (type) == HdbClear ? "Clear" : \
431 (type) == HdbList ? "List" : \
432 (type) == HdbWalk ? "Walk" : \
433 (type) == HdbVerify ? "Verify" : \
434 (type) == HdbEnable ? "Enable" : \
435 (type) == HdbDisable ? "Disable" : \
438#define PRINT_PESTATE(state) \
439 ((state) == PeValid ? "Valid" : \
440 (state) == PeSuspect ? "Suspect" : \
441 (state) == PeIndigent ? "Indigent" : \
442 (state) == PeInconsistent ? "Inconsistent" : \
friend class namectxt
Definition: fso.h:350
void print()
Definition: fso.h:699
Definition: rec_ohash.h:85
rec_olink * operator()()
Definition: rec_ohash.cc:248
Definition: rec_ohash.h:47
Definition: rec_olist.h:87
Definition: rec_olist.h:46
#define CODA_MAXPATHLEN
Definition: coda.h:115
int Create(long *, char *, long *)
int Delete(long *, char *)
#define REQUIRES_TRANSACTION
Definition: coda_tsa.h:107
#define EXCLUDES_TRANSACTION
Definition: coda_tsa.h:108
void HDB_Init()
Definition: hdb.cc:115
int MetaExpand(struct DirEntry *entry, long hook)
int NC_PriorityFN(bsnode *b1, bsnode *b2)
Definition: hdb.cc:2271
char PeriodicWalksAllowed
Definition: hdb.cc:90
int HDBEs
Definition: hdb.cc:86
int IndigentCount
Definition: hdb.cc:105
int HDBD_Request(hdbd_request type, void *request, struct uarea *u)
Definition: hdb_daemon.cc:133
void HDBDaemon(void)
Definition: hdb_daemon.cc:92
long HDBD_GetNextHoardWalkTime()
Definition: hdb_daemon.cc:84
void HDBD_Init(void)
Definition: hdb_daemon.cc:78
stdout
Definition: volusage.py:12
void path(char *pathname, char *direc, char *file)
Definition: path.c:53
PROCESS parent
Definition: smon2.c:80
Definition: venusfid.h:24
char realm[MAXHOSTNAMELEN+1]
Definition: hdb.h:74
int attributes
Definition: hdb.h:77
int priority
Definition: hdb.h:76
char name[CODA_MAXPATHLEN]
Definition: hdb.h:75
VolumeId vid
Definition: hdb.h:73
uid_t cuid
Definition: hdb.h:68
int spare
Definition: hdb.h:69
char name[CODA_MAXPATHLEN]
Definition: hdb.h:83
char realm[MAXHOSTNAMELEN+1]
Definition: hdb.h:82
VolumeId vid
Definition: hdb.h:81
uid_t luid
Definition: hdb.h:88
int spare
Definition: hdb.h:89
char outfile[CODA_MAXPATHLEN]
Definition: hdb.h:87
int verbosity
Definition: hdb.h:100
uid_t luid
Definition: hdb.h:98
char outfile[CODA_MAXPATHLEN]
Definition: hdb.h:97
int spare
Definition: hdb.h:99
int spare
Definition: hdb.h:93
dlink * Find(int priority, uid_t uid)
Definition: tallyent.cc:140
#define LOG(level, stmt)
Definition: venus.private.h:164
void RecovInit(void)
Definition: venusrecov.cc:227