Coda Distributed File System
|
#include <sys/types.h>
#include <sys/time.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/param.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <netinet/in.h>
#include <sys/wait.h>
#include "coda_string.h"
#include <setjmp.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <lwp/lwp.h>
#include <lwp/lock.h>
#include <util.h>
#include <partition.h>
#include <rvmlib.h>
#include <vice.h>
#include "coda_flock.h"
#include <srv.h>
#include "cvnode.h"
#include "volume.h"
#include "lockqueue.h"
#include <recov_vollog.h>
#include "vldb.h"
#include "vutil.h"
#include "fssync.h"
#include "index.h"
#include "recov.h"
#include "camprivate.h"
#include "coda_globals.h"
#include "volhash.h"
#include "volutil.h"
Macros | |
#define | VOLUME_BITMAP_GROWSIZE 16 /* bytes, => 128vnodes */ |
#define | VOLUME_HASH_TABLE_SIZE 128 /* Must be a power of 2!! */ |
#define | VOLUME_HASH(volumeId) (volumeId & (VOLUME_HASH_TABLE_SIZE - 1)) |
#define | OneDay (24 * 60 * 60) /* 24 hours */ |
#define | Midnight(date) ((date - TimeZoneCorrection) / OneDay * OneDay + TimeZoneCorrection) |
#define | SALVAGE_INTERVAL (10 * 60) |
#define | UPDATE_LIST_SIZE 100 /* size increment */ |
Functions | |
void | InitLogStorage () |
void | print_VnodeDiskObject (VnodeDiskObject *) |
int | HashLookup (VolumeId) |
void | dump_storage (int level, const char *s) |
void | VBumpVolumeUsage (Volume *vp) EXCLUDES_TRANSACTION |
int | VCheckVLDB () |
int | InSkipVolumeList (VolumeId, VolumeId *, int) |
void | InitVolTable (int) |
void | VAddToVolumeUpdateList (Error *ec, Volume *vp) REQUIRES_TRANSACTION |
void | FreeVolumeHeader (Volume *vp) |
void | DeleteVolumeFromHashTable (Volume *vp) |
int | VInitVolUtil (ProgramType pt) |
void | VInitVolumePackage (int nLargeVnodes, int nSmallVnodes, int DoSalvage) |
int | VConnectFS () |
void | VDisconnectFS () |
void | VInitThisHost (const char *host) |
void | VInitServerList (const char *host) |
void | VGetVolumeInfo (Error *ec, char *key, VolumeInfo *info) |
const char * | VGetVolumeLocation (VolumeId vid) |
void | VListVolumes (char **buf, unsigned int *offset) |
void | dumpvm () |
void | VShutdown () TRANSACTION_OPTIONAL |
Volume * | VAttachVolumeById (Error *ec, char *partition, VolumeId volid, int mode) |
Volume * | VAttachVolume (Error *ec, VolumeId volumeId, int mode) |
Volume * | VGetVolume (Error *ec, VolumeId volumeId) |
void | VPutVolume (Volume *vp) |
void | VForceOffline (Volume *vp) |
void | VOffline (Volume *vp, const char *message) |
void | VDetachVolume (Error *ec, Volume *vp) |
int | VAllocBitmapEntry (Error *ec, Volume *vp, struct vnodeIndex *index, int stride, int ix, int count) |
int | VAllocBitmapEntry (Error *ec, Volume *vp, struct vnodeIndex *index, VnodeId vnode) |
void | VFreeBitMapEntry (Error *ec, struct vnodeIndex *index, int bitNumber) |
void | VUpdateVolume (Error *ec, Volume *vp) |
void | PrintVolumesInHashTable () |
void | FreeVolume (Volume *vp) |
int | VolumeNumber (char *name) |
char * | VolumeExternalName (VolumeId volumeId) |
void | VSetDiskUsage () |
void | InitLRU (int howMany) |
void | VPrintCacheStats (FILE *fp) |
void | SetVolDebugLevel (int level) |
Error | VCheckDiskUsage (Volume *vp, int blocks) |
Error | VAdjustDiskUsage (Volume *vp, int blocks) |
int | GetVolObj (VolumeId Vid, Volume **volptr, int LockLevel, int Enque, unsigned LockerAddress) |
void | PutVolObj (Volume **volptr, int LockLevel, int Dequeue) |
Variables | |
char * | ThisHost |
uint8_t | ThisServerId |
bit32 | HostAddress [N_SERVERIDS] |
int | VInit |
int | HInit |
const char * | VSalvageMessage |
const char * | Server_FQDN [N_SERVERIDS] |
int | nskipvols |
VolumeId * | skipvolnums |
int | DumpVM |
rvm_offset_t | _Rvm_DataLength |
long | rds_rvmsize |
char * | rds_startaddr |
#define OneDay (24 * 60 * 60) /* 24 hours */ |
#define SALVAGE_INTERVAL (10 * 60) |
#define UPDATE_LIST_SIZE 100 /* size increment */ |
#define VOLUME_HASH | ( | volumeId | ) | (volumeId & (VOLUME_HASH_TABLE_SIZE - 1)) |
#define VOLUME_HASH_TABLE_SIZE 128 /* Must be a power of 2!! */ |
void DeleteVolumeFromHashTable | ( | Volume * | vp | ) |
void dump_storage | ( | int | level, |
const char * | s | ||
) |
void dumpvm | ( | ) |
void FreeVolume | ( | Volume * | vp | ) |
void FreeVolumeHeader | ( | Volume * | vp | ) |
int GetVolObj | ( | VolumeId | Vid, |
Volume ** | volptr, | ||
int | LockLevel, | ||
int | Enque = 0 , |
||
unsigned | LockerAddress = 0 |
||
) |
int HashLookup | ( | VolumeId | volid | ) |
void InitLogStorage | ( | ) |
void InitLRU | ( | int | howMany | ) |
void InitVolTable | ( | int | size | ) |
int InSkipVolumeList | ( | VolumeId | v, |
VolumeId * | vl, | ||
int | nvols | ||
) |
void print_VnodeDiskObject | ( | VnodeDiskObject * | vnode | ) |
void PrintVolumesInHashTable | ( | ) |
void PutVolObj | ( | Volume ** | volptr, |
int | LockLevel, | ||
int | Dequeue = 0 |
||
) |
void SetVolDebugLevel | ( | int | level | ) |
int VAllocBitmapEntry | ( | Error * | ec, |
Volume * | vp, | ||
struct vnodeIndex * | index, | ||
int | stride, | ||
int | ix, | ||
int | count | ||
) |
int VAllocBitmapEntry | ( | Error * | ec, |
Volume * | vp, | ||
struct vnodeIndex * | index, | ||
VnodeId | vnode | ||
) |
void VBumpVolumeUsage | ( | Volume * | vp | ) |
int VCheckVLDB | ( | ) |
int VConnectFS | ( | ) |
void VDisconnectFS | ( | ) |
void VForceOffline | ( | Volume * | vp | ) |
void VFreeBitMapEntry | ( | Error * | ec, |
struct vnodeIndex * | index, | ||
int | bitNumber | ||
) |
void VGetVolumeInfo | ( | Error * | ec, |
char * | key, | ||
VolumeInfo * | info | ||
) |
const char * VGetVolumeLocation | ( | VolumeId | vid | ) |
void VInitServerList | ( | const char * | host | ) |
void VInitThisHost | ( | const char * | host | ) |
void VInitVolumePackage | ( | int | nLargeVnodes, |
int | nSmallVnodes, | ||
int | DoSalvage | ||
) |
int VInitVolUtil | ( | ProgramType | pt | ) |
void VListVolumes | ( | char ** | buf, |
unsigned int * | offset | ||
) |
void VOffline | ( | Volume * | vp, |
const char * | message | ||
) |
char * VolumeExternalName | ( | VolumeId | volumeId | ) |
int VolumeNumber | ( | char * | name | ) |
void VPrintCacheStats | ( | FILE * | fp | ) |
void VPutVolume | ( | Volume * | vp | ) |
void VSetDiskUsage | ( | ) |
void VShutdown | ( | ) |
|
extern |
|
extern |
int HInit |
bit32 HostAddress[N_SERVERIDS] |
|
extern |
|
extern |
|
extern |
const char* Server_FQDN[N_SERVERIDS] |
|
extern |
char* ThisHost |
uint8_t ThisServerId |
int VInit |
const char* VSalvageMessage |