Coda Distributed File System
|
#include <lwp/lock.h>
#include <sys/types.h>
#include <time.h>
#include <coda.h>
#include <vcrcommon.h>
#include <dllist.h>
#include <coda_tsa.h>
Go to the source code of this file.
Classes | |
struct | DirHandle |
struct | DirNFid |
struct | DirEntry |
struct | DirInode |
Macros | |
#define | DIR_PAGESIZE 2048 |
#define | DIR_MAXPAGES 128 |
#define | DIR_DATA_IN_RVM 1 |
#define | DIR_DATA_IN_VM 0 |
#define | ISDIR(fid) ((fid).Vnode & 1) /* Directory fids are odd */ |
#define | FID_LT(a, b) |
#define | FID_LTE(a, b) |
#define | DIR_intrans() DIR_check_trans(__FUNCTION__, __FILE__) |
Typedefs | |
typedef struct DirEntry * | PDirEntry |
typedef struct DirFid * | PDirFid |
typedef struct DirHeader * | PDirHeader |
typedef struct DirHandle * | PDirHandle |
typedef struct DCEntry * | PDCEntry |
typedef struct DirInode * | PDirInode |
Functions | |
int | DIR_Init (int data_loc) |
void | DH_LockW (PDirHandle dh) |
void | DH_LockR (PDirHandle dh) |
void | DH_UnLockW (PDirHandle dh) |
void | DH_UnLockR (PDirHandle dh) |
void | DH_Init (PDirHandle dh) |
void | DH_Alloc (PDirHandle dh, int size, int in_rvm) |
PDirHeader | DH_Data (PDirHandle dh) |
void | DH_Free (PDirHandle dh, int in_rvm) |
void | DH_FreeData (PDirHandle dh) |
PDirHandle | DH_New (int in_rvm, PDirHeader vmdata, PDirHeader rvmdata) |
int | DH_Length (PDirHandle dh) |
int | DH_Convert (PDirHandle dh, char *file, VolumeId vol, RealmId realm) |
int | DH_Create (PDirHandle dh, const char *entry, struct ViceFid *vfid) |
int | DH_IsEmpty (PDirHandle dh) |
int | DH_Lookup (PDirHandle dh, const char *entry, struct ViceFid *vfid, int flags) |
char * | DH_FindName (PDirHandle dh, struct DirFid *fid, char *name, int len) |
int | DH_LookupByFid (PDirHandle dh, char *entry, struct ViceFid *vfid) |
int | DH_Delete (PDirHandle dh, const char *entry) |
int | DH_DirOK (PDirHandle dh) |
void | DH_Print (PDirHandle dh, FILE *f) |
void | DH_PrintStats (FILE *fp) |
int | DH_MakeDir (PDirHandle dh, struct ViceFid *vme, struct ViceFid *vparent) |
int | DH_EnumerateDir (PDirHandle dh, int(*hookproc)(struct DirEntry *de, void *hook), void *hook) |
int | DH_Commit (PDirHandle dh) |
void | DH_Get (PDirHandle, PDirHeader) |
void | DH_Put (PDirHandle) |
int | FID_IsVolRoot (const struct ViceFid *fid) |
void | FID_MakeRoot (struct ViceFid *fid) |
int | FID_IsDisco (const struct ViceFid *x) |
int | FID_IsLocalDir (const struct ViceFid *fid) |
int | FID_IsLocalFile (const struct ViceFid *fid) |
void | FID_MakeDiscoFile (struct ViceFid *fid, VolumeId vid, Unique_t unique) |
void | FID_MakeDiscoDir (struct ViceFid *fid, VolumeId vid, Unique_t unique) |
int | FID_IsFakeRoot (struct ViceFid *fid) |
void | FID_MakeSubtreeRoot (struct ViceFid *fid, VolumeId vid, Unique_t unique) |
void | FID_MakeLocalDir (struct ViceFid *fid, Unique_t unique) |
void | FID_MakeLocalFile (struct ViceFid *fid, Unique_t unique) |
void | FID_MakeLocalSubtreeRoot (struct ViceFid *fid, Unique_t unique) |
int | FID_EQ (const struct ViceFid *fa, const struct ViceFid *fb) |
int | FID_VolEQ (const struct ViceFid *fa, const struct ViceFid *fb) |
int | FID_Cmp (const struct ViceFid *, const struct ViceFid *) |
void | FID_CpyVol (struct ViceFid *target, const struct ViceFid *source) |
void | FID_VFid2DFid (const struct ViceFid *vf, struct DirFid *df) |
void | FID_DFid2VFid (const struct DirFid *df, struct ViceFid *vf) |
void | FID_PrintFid (const struct DirFid *fid) |
void | FID_Int2DFid (struct DirFid *fid, const int vnode, const int unique) |
void | FID_NFid2Int (const struct DirNFid *fid, VnodeId *vnode, Unique_t *unique) |
char * | FID_ (const struct ViceFid *fid) |
int | DIR_init (int) |
int | DIR_Compare (PDirHeader, PDirHeader) |
int | DIR_Length (PDirHeader) |
void | DIR_Print (PDirHeader, FILE *f) |
void | DIR_check_trans (const char *where, const char *file) |
struct PageHeader * | DIR_Page (struct DirHeader *dirh, int page) |
void | DC_SetDI (PDCEntry pdce, PDirInode pdi) |
PDirHeader | DI_DiToDh (PDirInode pdi) |
void | DI_DhToDi (PDCEntry pdce) REQUIRES_TRANSACTION |
void | DI_Copy (PDirInode oldinode, PDirInode *newinode) REQUIRES_TRANSACTION |
void | DI_Dec (PDirInode pdi) REQUIRES_TRANSACTION |
void | DI_Inc (PDirInode pdi) REQUIRES_TRANSACTION |
int | DI_Count (PDirInode) |
int | DI_Pages (PDirInode) |
void * | DI_Page (PDirInode, int) |
void | DI_VMCopy (PDirInode oldinode, PDirInode *newinode) |
void | DI_VMFree (PDirInode pdi) |
void | DI_VMDec (PDirInode pdi) |
void | DC_SetCount (PDCEntry pdce, int count) |
void | DC_SetRefcount (PDCEntry pdc, int count) |
PDirInode | DC_DC2DI (PDCEntry pdce) |
int | DC_Refcount (PDCEntry) |
void | DC_Put (PDCEntry) |
void | DC_Drop (PDCEntry) |
int | DC_Count (PDCEntry pdce) |
void | DC_SetDirh (PDCEntry pdce, PDirHeader pdh) |
PDirInode | DC_Cowpdi (PDCEntry) |
void | DC_SetCowpdi (PDCEntry, PDirInode) |
int | DC_Dirty (PDCEntry) |
void | DC_SetDirty (PDCEntry, int) |
PDCEntry | DC_Get (PDirInode) |
PDCEntry | DC_New () |
PDirHandle | DC_DC2DH (PDCEntry) |
PDCEntry | DC_DH2DC (PDirHandle pdh) |
void | DC_Rehash (PDCEntry) |
void | DC_HashInit () |
#define DIR_DATA_IN_RVM 1 |
#define DIR_DATA_IN_VM 0 |
#define DIR_intrans | ( | ) | DIR_check_trans(__FUNCTION__, __FILE__) |
#define DIR_MAXPAGES 128 |
#define DIR_PAGESIZE 2048 |
#define FID_LT | ( | a, | |
b | |||
) |
#define FID_LTE | ( | a, | |
b | |||
) |
typedef struct DirFid* PDirFid |
typedef struct DirHandle* PDirHandle |
typedef struct DirHeader* PDirHeader |
int DC_Count | ( | PDCEntry | pdce | ) |
PDirHandle DC_DC2DH | ( | PDCEntry | pdce | ) |
PDCEntry DC_DH2DC | ( | PDirHandle | pdh | ) |
int DC_Dirty | ( | PDCEntry | pdce | ) |
void DC_Drop | ( | PDCEntry | pdce | ) |
void DC_HashInit | ( | ) |
PDCEntry DC_New | ( | ) |
void DC_Put | ( | PDCEntry | pdce | ) |
|
inline |
void DC_Rehash | ( | PDCEntry | pdce | ) |
void DC_SetCount | ( | PDCEntry | pdce, |
int | count | ||
) |
void DC_SetDirh | ( | PDCEntry | pdce, |
PDirHeader | pdh | ||
) |
void DC_SetDirty | ( | PDCEntry | pdce, |
int | flag | ||
) |
|
inline |
void DH_Alloc | ( | PDirHandle | dh, |
int | size, | ||
int | in_rvm | ||
) |
int DH_Commit | ( | PDirHandle | dh | ) |
int DH_Convert | ( | PDirHandle | dh, |
char * | file, | ||
VolumeId | vol, | ||
RealmId | realm | ||
) |
int DH_Create | ( | PDirHandle | dh, |
const char * | entry, | ||
struct ViceFid * | vfid | ||
) |
PDirHeader DH_Data | ( | PDirHandle | dh | ) |
int DH_Delete | ( | PDirHandle | dh, |
const char * | entry | ||
) |
int DH_DirOK | ( | PDirHandle | dh | ) |
int DH_EnumerateDir | ( | PDirHandle | dh, |
int(*)(struct DirEntry *de, void *hook) | hookproc, | ||
void * | hook | ||
) |
char * DH_FindName | ( | PDirHandle | dh, |
struct DirFid * | fid, | ||
char * | name, | ||
int | len | ||
) |
void DH_Free | ( | PDirHandle | dh, |
int | in_rvm | ||
) |
void DH_FreeData | ( | PDirHandle | dh | ) |
void DH_Get | ( | PDirHandle | , |
PDirHeader | |||
) |
void DH_Init | ( | PDirHandle | dh | ) |
int DH_IsEmpty | ( | PDirHandle | dh | ) |
int DH_Length | ( | PDirHandle | dh | ) |
void DH_LockR | ( | PDirHandle | dh | ) |
void DH_LockW | ( | PDirHandle | dh | ) |
int DH_Lookup | ( | PDirHandle | dh, |
const char * | entry, | ||
struct ViceFid * | vfid, | ||
int | flags | ||
) |
int DH_LookupByFid | ( | PDirHandle | dh, |
char * | entry, | ||
struct ViceFid * | vfid | ||
) |
int DH_MakeDir | ( | PDirHandle | dh, |
struct ViceFid * | vme, | ||
struct ViceFid * | vparent | ||
) |
PDirHandle DH_New | ( | int | in_rvm, |
PDirHeader | vmdata, | ||
PDirHeader | rvmdata | ||
) |
void DH_Print | ( | PDirHandle | dh, |
FILE * | f | ||
) |
void DH_PrintStats | ( | FILE * | fp | ) |
void DH_Put | ( | PDirHandle | ) |
void DH_UnLockR | ( | PDirHandle | dh | ) |
void DH_UnLockW | ( | PDirHandle | dh | ) |
int DI_Count | ( | PDirInode | pdi | ) |
void DI_Dec | ( | PDirInode | pdi | ) |
void DI_DhToDi | ( | PDCEntry | pdce | ) |
PDirHeader DI_DiToDh | ( | PDirInode | pdi | ) |
void DI_Inc | ( | PDirInode | pdi | ) |
void * DI_Page | ( | PDirInode | pdi, |
int | page | ||
) |
int DI_Pages | ( | PDirInode | pdi | ) |
void DI_VMDec | ( | PDirInode | pdi | ) |
void DI_VMFree | ( | PDirInode | pdi | ) |
|
inline |
int DIR_Compare | ( | PDirHeader | d1, |
PDirHeader | d2 | ||
) |
int DIR_Init | ( | int | data_loc | ) |
int DIR_init | ( | int | ) |
int DIR_Length | ( | PDirHeader | ) |
struct PageHeader * DIR_Page | ( | struct DirHeader * | dirh, |
int | page | ||
) |
void DIR_Print | ( | PDirHeader | dir, |
FILE * | f | ||
) |
char * FID_ | ( | const struct ViceFid * | fid | ) |
int FID_Cmp | ( | const struct ViceFid * | fa, |
const struct ViceFid * | fb | ||
) |
void FID_CpyVol | ( | struct ViceFid * | target, |
const struct ViceFid * | source | ||
) |
void FID_DFid2VFid | ( | const struct DirFid * | df, |
struct ViceFid * | vf | ||
) |
int FID_EQ | ( | const struct ViceFid * | fa, |
const struct ViceFid * | fb | ||
) |
void FID_Int2DFid | ( | struct DirFid * | fid, |
const int | vnode, | ||
const int | unique | ||
) |
int FID_IsDisco | ( | const struct ViceFid * | x | ) |
int FID_IsFakeRoot | ( | struct ViceFid * | fid | ) |
int FID_IsLocalDir | ( | const struct ViceFid * | fid | ) |
int FID_IsLocalFile | ( | const struct ViceFid * | fid | ) |
int FID_IsVolRoot | ( | const struct ViceFid * | fid | ) |
void FID_MakeDiscoDir | ( | struct ViceFid * | fid, |
VolumeId | vid, | ||
Unique_t | unique | ||
) |
void FID_MakeDiscoFile | ( | struct ViceFid * | fid, |
VolumeId | vid, | ||
Unique_t | unique | ||
) |
void FID_MakeLocalDir | ( | struct ViceFid * | fid, |
Unique_t | unique | ||
) |
void FID_MakeLocalFile | ( | struct ViceFid * | fid, |
Unique_t | unique | ||
) |
void FID_MakeLocalSubtreeRoot | ( | struct ViceFid * | fid, |
Unique_t | unique | ||
) |
void FID_MakeRoot | ( | struct ViceFid * | fid | ) |
void FID_MakeSubtreeRoot | ( | struct ViceFid * | fid, |
VolumeId | vid, | ||
Unique_t | unique | ||
) |
void FID_NFid2Int | ( | const struct DirNFid * | fid, |
VnodeId * | vnode, | ||
Unique_t * | unique | ||
) |
void FID_PrintFid | ( | const struct DirFid * | fid | ) |
void FID_VFid2DFid | ( | const struct ViceFid * | vf, |
struct DirFid * | df | ||
) |
int FID_VolEQ | ( | const struct ViceFid * | fa, |
const struct ViceFid * | fb | ||
) |