Coda Distributed File System
coda_dir.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
16#*/
17
18/*
19 IBM COPYRIGHT NOTICE
20
21 Copyright (C) 1986
22 International Business Machines Corporation
23 All Rights Reserved
24
25This file contains some code identical to or derived from the 1986
26version of the Andrew File System ("AFS"), which is owned by the IBM
27Corporation. This code is provided "AS IS" and IBM does not warrant
28that it is free of infringement of any intellectual rights of any
29third party. IBM disclaims liability of any kind for any damages
30whatsoever resulting directly or indirectly from use of this software
31or of any derivative work. Carnegie Mellon University has obtained
32permission to modify, distribute and sublicense this code, which is
33based on Version 2 of AFS and does not contain the features and
34enhancements that are part of Version 3 of AFS. Version 3 of AFS is
35commercially available and supported by Transarc Corporation,
36Pittsburgh, PA.
37
38*/
39
40#ifndef _DIR_H_
41#define _DIR_H_ 1
42
43/* extern definitions for dir.c */
44extern int NameBlobs(char *);
45extern int Create(long *, char *, long *);
46extern int Delete(long *, char *);
47extern int MakeDir(long *, long *, long *);
48extern int Lookup(long *, char *, long *);
49extern struct DirEntry *GetBlob(long *, long);
50extern int DirHash(char *);
51extern int EnumerateDir(long *, int (*)(void *par1, ...), long);
52extern int DirToNetBuf(long *, char *, int, int *);
53extern char *FindName(long *, long, long, char *);
54extern int IsEmpty(long *);
55extern int Length(long *);
56
57/* extern definitions for buffer.c */
58struct buffer {
59 int fid[5]; /* Unique cache key + i/o addressing */
60 int page;
63 char *data;
64 char lockers;
65 char dirty;
67};
68
69#ifdef __linux__
70typedef struct buffer buffer;
71#endif
72
73extern void DStat(int *, int *, int *);
74extern int DInit(int);
75extern char *DRead(long *, int);
76extern void DRelease(struct buffer *, int);
77extern int DVOffset(struct buffer *);
78extern void DFlush();
79extern char *DNew(long *, int);
80extern void DZap(long *);
81extern void DFlushEntry(long *);
82
83/* extern definitions for salvage.c */
84extern int DirOK(long *);
85extern int DirSalvage(long *, long *);
86
87#endif _DIR_H_
int DirOK(long *)
void DRelease(struct buffer *, int)
char * DNew(long *, int)
void DFlushEntry(long *)
int DirSalvage(long *, long *)
Definition: salvage.cc:70
void DZap(long *)
int EnumerateDir(long *, int(*)(void *par1,...), long)
struct DirEntry * GetBlob(long *, long)
int Create(long *, char *, long *)
int Length(long *)
void DFlush()
void DStat(int *, int *, int *)
int NameBlobs(char *)
int IsEmpty(long *)
int Lookup(long *, char *, long *)
char * DRead(long *, int)
int MakeDir(long *, long *, long *)
int DVOffset(struct buffer *)
char * FindName(long *, long, long, char *)
int Delete(long *, char *)
int DirHash(char *)
int DInit(int)
int DirToNetBuf(long *, char *, int, int *)
Definition: codadir.h:66
Definition: coda_dir.h:58
char dirty
Definition: coda_dir.h:65
struct buffer * hashNext
Definition: coda_dir.h:62
char * data
Definition: coda_dir.h:63
char lockers
Definition: coda_dir.h:64
int accesstime
Definition: coda_dir.h:61
int fid[5]
Definition: coda_dir.h:59
int page
Definition: coda_dir.h:60
char hashIndex
Definition: coda_dir.h:66