Coda Distributed File System
Classes | Macros | Functions | Variables
dirbody.c File Reference
#include <stdio.h>
#include "coda_assert.h"
#include <sys/param.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <errno.h>
#include "coda_string.h"
#include <stdlib.h>
#include <stdint.h>
#include <dirent.h>
#include <lwp/lwp.h>
#include <lwp/lock.h>
#include <rvmlib.h>
#include <ctype.h>
#include "codadir.h"
#include "dirbody.h"
Include dependency graph for dirbody.c:

Classes

struct  DirFind
 
struct  DirStat
 

Macros

#define DIRBLKSIZ   0x1000
 
#define minEntry   12 /* XXX */
 
#define TO_RVM   1
 
#define TO_VM   0
 

Functions

void DIR_Print (PDirHeader, FILE *f)
 
struct DirEntrydir_GetBlob (struct DirHeader *dir, long blobno)
 
void DIR_check_trans (const char *where, const char *file)
 
int DIR_rvm (void)
 
struct PageHeaderDIR_Page (struct DirHeader *dirh, int page)
 
int dir_PrintChar (char *addr, int nbits, char *buff)
 
int DIR_Init (int data_loc)
 
void DH_PrintStats (FILE *fp)
 
int DIR_LookupByFid (PDirHeader dhp, char *name, DirFid *fid)
 
int DIR_Length (struct DirHeader *dir)
 
int DIR_Create (struct DirHeader **dh, const char *entry, DirFid *fid)
 
int DIR_Delete (struct DirHeader *dir, const char *entry)
 
int DIR_MakeDir (struct DirHeader **dir, DirFid *me, DirFid *parent) TRANSACTION_OPTIONAL
 
void DIR_Setpages (PDirHeader dirh, int pages)
 
void DIR_Free (struct DirHeader *dir, int in_rvm) TRANSACTION_OPTIONAL
 
int DIR_PrintEntry (PDirEntry entry, FILE *f)
 
void DIR_PrintChain (PDirHeader dir, int chain, FILE *f)
 
int DIR_Lookup (struct DirHeader *dir, const char *entry, DirFid *fid, int flags)
 
int dir_HkCompare (PDirEntry de, void *hook)
 
int DIR_Convert (PDirHeader dir, char *file, VolumeId vol, RealmId realm)
 
int DIR_EnumerateDir (struct DirHeader *dhp, int(*hookproc)(struct DirEntry *de, void *hook), void *hook)
 
int DIR_Compare (PDirHeader d1, PDirHeader d2)
 
void dir_Copy (PDirHeader old, PDirHeader *new, int to_rvm) TRANSACTION_OPTIONAL
 
int DIR_IsEmpty (struct DirHeader *dhp)
 
int DIR_Hash (const char *string)
 
int dir_FindCaseInsensitive (PDirEntry de, void *hook)
 
int DIR_DirOK (PDirHeader pdh)
 

Variables

int dir_data_in_rvm
 
struct DirStat dir_stats
 

Macro Definition Documentation

◆ DIRBLKSIZ

#define DIRBLKSIZ   0x1000

◆ minEntry

#define minEntry   12 /* XXX */

◆ TO_RVM

#define TO_RVM   1

◆ TO_VM

#define TO_VM   0

Function Documentation

◆ DH_PrintStats()

void DH_PrintStats ( FILE *  fp)

◆ DIR_check_trans()

void DIR_check_trans ( const char *  where,
const char *  file 
)
inline

◆ DIR_Compare()

int DIR_Compare ( PDirHeader  d1,
PDirHeader  d2 
)

◆ DIR_Convert()

int DIR_Convert ( PDirHeader  dir,
char *  file,
VolumeId  vol,
RealmId  realm 
)

◆ dir_Copy()

void dir_Copy ( PDirHeader  old,
PDirHeader new,
int  to_rvm 
)

◆ DIR_Create()

int DIR_Create ( struct DirHeader **  dh,
const char *  entry,
DirFid *  fid 
)

◆ DIR_Delete()

int DIR_Delete ( struct DirHeader dir,
const char *  entry 
)

◆ DIR_DirOK()

int DIR_DirOK ( PDirHeader  pdh)

◆ DIR_EnumerateDir()

int DIR_EnumerateDir ( struct DirHeader dhp,
int(*)(struct DirEntry *de, void *hook)  hookproc,
void *  hook 
)

◆ dir_FindCaseInsensitive()

int dir_FindCaseInsensitive ( PDirEntry  de,
void *  hook 
)

◆ DIR_Free()

void DIR_Free ( struct DirHeader dir,
int  in_rvm 
)

◆ dir_GetBlob()

struct DirEntry * dir_GetBlob ( struct DirHeader dir,
long  blobno 
)

◆ DIR_Hash()

int DIR_Hash ( const char *  string)

◆ dir_HkCompare()

int dir_HkCompare ( PDirEntry  de,
void *  hook 
)

◆ DIR_Init()

int DIR_Init ( int  data_loc)

◆ DIR_IsEmpty()

int DIR_IsEmpty ( struct DirHeader dhp)

◆ DIR_Length()

int DIR_Length ( struct DirHeader dir)

◆ DIR_Lookup()

int DIR_Lookup ( struct DirHeader dir,
const char *  entry,
DirFid *  fid,
int  flags 
)

◆ DIR_LookupByFid()

int DIR_LookupByFid ( PDirHeader  dhp,
char *  name,
DirFid *  fid 
)

◆ DIR_MakeDir()

int DIR_MakeDir ( struct DirHeader **  dir,
DirFid *  me,
DirFid *  parent 
)

◆ DIR_Page()

struct PageHeader * DIR_Page ( struct DirHeader dirh,
int  page 
)

◆ DIR_Print()

void DIR_Print ( PDirHeader  dir,
FILE *  f 
)

◆ DIR_PrintChain()

void DIR_PrintChain ( PDirHeader  dir,
int  chain,
FILE *  f 
)

◆ dir_PrintChar()

int dir_PrintChar ( char *  addr,
int  nbits,
char *  buff 
)

◆ DIR_PrintEntry()

int DIR_PrintEntry ( PDirEntry  entry,
FILE *  f 
)

◆ DIR_rvm()

int DIR_rvm ( void  )

◆ DIR_Setpages()

void DIR_Setpages ( PDirHeader  dirh,
int  pages 
)

Variable Documentation

◆ dir_data_in_rvm

int dir_data_in_rvm

◆ dir_stats

struct DirStat dir_stats