|
Coda Distributed File System
|
#include <sys/file.h>#include <stdio.h>#include <errno.h>#include <lwp/lwp.h>#include <lwp/lock.h>#include <rpc2/rpc2.h>#include <rpc2/errors.h>#include <prs.h>#include <voltypes.h>#include <inconsist.h>#include <vice.h>#include <cvnode.h>#include <auth2.h>#include <deprecations.h>
Go to the source code of this file.
Classes | |
| struct | HostTable |
| struct | ClientEntry |
Macros | |
| #define | ThisHostAddr ((unsigned long)(HostAddress[ThisServerId])) |
| #define | VolToHostAddr(volnum) ((unsigned long)(HostAddress[(volnum) >> 24])) |
| #define | VolToServerId(volnum) ((uint8_t)((volnum) >> 24)) |
| #define | ISDIR(fid) ((fid).Vnode & 1) |
| #define | VSLEEP(seconds) |
| #define | STREQ(a, b) (strcmp((a), (b)) == 0) |
| #define | STRNEQ(a, b, n) (strncmp((a), (b), (n)) == 0) |
| #define | SetAccessList(vptr, ACL, ACLSize) |
| #define | MAXHOSTTABLEENTRIES 1000 |
| #define | MAXNAMELENGTH 64 |
| #define | MAXHOSTLENGTH 32 |
| #define | EMPTYFILEBLOCKS 1 |
| #define | EMPTYDIRBLOCKS 2 |
| #define | EMPTYSYMLINKBLOCKS 1 |
| #define | NEWCONNECT "NEWCONNECT" |
| #define | MAXMSG 100 |
| #define | MAXMSGLN 128 |
| #define | MAXCNTRS (srvOPARRAYSIZE + 17) |
| #define | TOTAL 0 |
| #define | DISCONNECT ViceDisconnectFS_OP |
| #define | GETATTRPLUSSHA ViceGetAttrPlusSHA_OP |
| #define | GETACL ViceGetACL_OP |
| #define | FETCH ViceFetch_OP |
| #define | SETACL ViceSetACL_OP |
| #define | REMOVECALLBACK ViceRemoveCallBack_OP |
| #define | SETLOCK ViceSetLock_OP |
| #define | RELEASELOCK ViceReleaseLock_OP |
| #define | GETROOTVOLUME ViceGetRootVolume_OP |
| #define | GETVOLUMESTAT ViceGetVolumeStatus_OP |
| #define | SETVOLUMESTAT ViceSetVolumeStatus_OP |
| #define | GETTIME ViceGetTime_OP |
| #define | GETSTATISTICS ViceGetStatistics_OP |
| #define | GETVOLUMEINFO ViceGetVolumeInfo_OP |
| #define | RESOLVE ViceResolve_OP |
| #define | REPAIR ViceRepair_OP |
| #define | SETVV ViceSetVV_OP |
| #define | REINTEGRATE ViceReintegrate_OP |
| #define | ALLOCFIDS ViceAllocFids_OP |
| #define | VALIDATEATTRSPLUSSHA ViceValidateAttrsPlusSHA_OP |
| #define | NEWCONNECTFS ViceNewConnectFS_OP |
| #define | GETVOLVS ViceGetVolVS_OP |
| #define | VALIDATEVOLS ViceValidateVols_OP |
| #define | FETCHDATAOP (srvOPARRAYSIZE + 1) |
| #define | FETCHDATA (srvOPARRAYSIZE + 2) |
| #define | FETCHD1 (srvOPARRAYSIZE + 3) |
| #define | FETCHD2 (srvOPARRAYSIZE + 4) |
| #define | FETCHD3 (srvOPARRAYSIZE + 5) |
| #define | FETCHD4 (srvOPARRAYSIZE + 6) |
| #define | FETCHD5 (srvOPARRAYSIZE + 7) |
| #define | FETCHTIME (srvOPARRAYSIZE + 8) |
| #define | STOREDATAOP (srvOPARRAYSIZE + 9) |
| #define | STOREDATA (srvOPARRAYSIZE + 10) |
| #define | STORED1 (srvOPARRAYSIZE + 11) |
| #define | STORED2 (srvOPARRAYSIZE + 12) |
| #define | STORED3 (srvOPARRAYSIZE + 13) |
| #define | STORED4 (srvOPARRAYSIZE + 14) |
| #define | STORED5 (srvOPARRAYSIZE + 15) |
| #define | STORETIME (srvOPARRAYSIZE + 16) |
| #define | SIZE1 1024 |
| #define | SIZE2 SIZE1 * 8 |
| #define | SIZE3 SIZE2 * 8 |
| #define | SIZE4 SIZE3 * 8 |
| #define | SubTimes(end, start) |
| #define | time_value_sub(t1, t2, t3) |
| #define | START_TIMING(id) |
| #define | END_TIMING(id) |
Typedefs | |
| typedef struct HostTable | HostTable |
| typedef struct ClientEntry | ClientEntry |
Functions | |
| void | VAdjustDiskUsage (Error *, Volume *, int) |
| int | VCheckVLDB () |
| void | VPrintCacheStats (FILE *=stdout) |
| void | ViceUpdateDB () |
| void | SwapLog (int ign) |
| void | SwapMalloc () |
| void | ViceTerminate () |
| char * | ViceErrorMsg (int) |
| long | InternalCOP2 (RPC2_Handle, ViceStoreId *, ViceVersionVector *) EXCLUDES_TRANSACTION |
| void | NewCOP1Update (Volume *, Vnode *, ViceStoreId *, RPC2_Integer *=NULL, bool isReplicated=true) |
| void | COP2Update (Volume *, Vnode *, ViceVersionVector *) |
| void | PollAndYield () |
| int | GetSubTree (ViceFid *, Volume *, dlist *) |
| void | GetMyVS (Volume *, RPC2_CountedBS *, RPC2_Integer *, int voltype) |
| void | SetVSStatus (ClientEntry *, Volume *, RPC2_Integer *, CallBackStatus *, int voltype) |
| int | LookupChild (Volume *, Vnode *, char *, ViceFid *) |
| int | AddChild (Volume **, dlist *, ViceFid *, char *, int=0) EXCLUDES_TRANSACTION |
| void | Die (const char *) |
| void | SetStatus (Vnode *, ViceStatus *, Rights, Rights) |
| int | GetRights (PRS_InternalCPS *, AL_AccessList *, int, Rights *, Rights *) |
| int | GetFsObj (ViceFid *, Volume **, Vnode **, int, int, int, int, int) EXCLUDES_TRANSACTION |
| int | SystemUser (ClientEntry *) |
| int | AdjustDiskUsage (Volume *, int) |
| void | ChangeDiskUsage (Volume *, int) |
| int | GetVolObj (VolumeId, Volume **, int, int=0, unsigned=0) |
| void | PutVolObj (Volume **, int, int=0) |
| int | CheckDiskUsage (Volume *, int) |
| void | PrintCounters (FILE *fp=stdout) |
| int | GetEtherStats () |
| int | InitCallBack () |
| CallBackStatus | AddCallBack (HostTable *, ViceFid *) |
| void | BreakCallBack (HostTable *, ViceFid *) |
| void | DeleteCallBack (HostTable *, ViceFid *) |
| void | DeleteVenus (HostTable *) |
| void | DeleteFile (ViceFid *) |
| void | PrintCallBackState (FILE *) |
| void | PrintCallBacks (ViceFid *, FILE *) |
| CallBackStatus | CodaAddCallBack (HostTable *, ViceFid *, VolumeId) |
| void | CodaBreakCallBack (HostTable *, ViceFid *, VolumeId) |
| void | CodaDeleteCallBack (HostTable *, ViceFid *, VolumeId) |
| void | AddToCopPendingTable (ViceStoreId *, ViceFid *) |
| void | InitVolUtil (int stacksize) EXCLUDES_TRANSACTION |
Variables | |
| bit32 HostAddress[] | WARN_SINGLE_HOMING |
| uint8_t | ThisServerId |
| long | rvm_no_yield |
| ViceVersionVector | NullVV |
| int | SystemId |
| int | AnyUserId |
| int | SrvDebugLevel |
| unsigned | StartTime |
| int | CurrentConnections |
| int | Authenticate |
| int | Counters [] |
| const ViceFid | NullFid |
| const int | MaxVols |
| int | pollandyield |
| int | probingon |
| const char * | CodaSrvIp |
| int | supported |
| unsigned int | etherWrites |
| unsigned int | etherRetries |
| unsigned int | etherInterupts |
| unsigned int | etherGoodReads |
| unsigned int | etherBytesRead |
| unsigned int | etherBytesWritten |
| int | CBEs |
| int | CBEBlocks |
| int | FEs |
| int | FEBlocks |
| int | AllowResolution |
| int | AllowSHA |
| #define ALLOCFIDS ViceAllocFids_OP |
| #define DISCONNECT ViceDisconnectFS_OP |
| #define EMPTYDIRBLOCKS 2 |
| #define EMPTYFILEBLOCKS 1 |
| #define EMPTYSYMLINKBLOCKS 1 |
| #define END_TIMING | ( | id | ) |
| #define FETCH ViceFetch_OP |
| #define FETCHD1 (srvOPARRAYSIZE + 3) |
| #define FETCHD2 (srvOPARRAYSIZE + 4) |
| #define FETCHD3 (srvOPARRAYSIZE + 5) |
| #define FETCHD4 (srvOPARRAYSIZE + 6) |
| #define FETCHD5 (srvOPARRAYSIZE + 7) |
| #define FETCHDATA (srvOPARRAYSIZE + 2) |
| #define FETCHDATAOP (srvOPARRAYSIZE + 1) |
| #define FETCHTIME (srvOPARRAYSIZE + 8) |
| #define GETACL ViceGetACL_OP |
| #define GETATTRPLUSSHA ViceGetAttrPlusSHA_OP |
| #define GETROOTVOLUME ViceGetRootVolume_OP |
| #define GETSTATISTICS ViceGetStatistics_OP |
| #define GETTIME ViceGetTime_OP |
| #define GETVOLUMEINFO ViceGetVolumeInfo_OP |
| #define GETVOLUMESTAT ViceGetVolumeStatus_OP |
| #define GETVOLVS ViceGetVolVS_OP |
| #define MAXCNTRS (srvOPARRAYSIZE + 17) |
| #define MAXHOSTLENGTH 32 |
| #define MAXHOSTTABLEENTRIES 1000 |
| #define MAXMSG 100 |
| #define MAXMSGLN 128 |
| #define MAXNAMELENGTH 64 |
| #define NEWCONNECT "NEWCONNECT" |
| #define NEWCONNECTFS ViceNewConnectFS_OP |
| #define REINTEGRATE ViceReintegrate_OP |
| #define RELEASELOCK ViceReleaseLock_OP |
| #define REMOVECALLBACK ViceRemoveCallBack_OP |
| #define REPAIR ViceRepair_OP |
| #define RESOLVE ViceResolve_OP |
| #define SetAccessList | ( | vptr, | |
| ACL, | |||
| ACLSize | |||
| ) |
| #define SETACL ViceSetACL_OP |
| #define SETLOCK ViceSetLock_OP |
| #define SETVOLUMESTAT ViceSetVolumeStatus_OP |
| #define SETVV ViceSetVV_OP |
| #define SIZE1 1024 |
| #define START_TIMING | ( | id | ) |
| #define STORED1 (srvOPARRAYSIZE + 11) |
| #define STORED2 (srvOPARRAYSIZE + 12) |
| #define STORED3 (srvOPARRAYSIZE + 13) |
| #define STORED4 (srvOPARRAYSIZE + 14) |
| #define STORED5 (srvOPARRAYSIZE + 15) |
| #define STOREDATA (srvOPARRAYSIZE + 10) |
| #define STOREDATAOP (srvOPARRAYSIZE + 9) |
| #define STORETIME (srvOPARRAYSIZE + 16) |
| #define STRNEQ | ( | a, | |
| b, | |||
| n | |||
| ) | (strncmp((a), (b), (n)) == 0) |
| #define SubTimes | ( | end, | |
| start | |||
| ) |
| #define ThisHostAddr ((unsigned long)(HostAddress[ThisServerId])) |
| #define TOTAL 0 |
| #define VALIDATEATTRSPLUSSHA ViceValidateAttrsPlusSHA_OP |
| #define VALIDATEVOLS ViceValidateVols_OP |
| #define VolToHostAddr | ( | volnum | ) | ((unsigned long)(HostAddress[(volnum) >> 24])) |
| #define VSLEEP | ( | seconds | ) |
| typedef struct ClientEntry ClientEntry |
| CallBackStatus AddCallBack | ( | HostTable * | client, |
| ViceFid * | afid | ||
| ) |
| void AddToCopPendingTable | ( | ViceStoreId * | stid, |
| ViceFid * | fids | ||
| ) |
| int AdjustDiskUsage | ( | Volume * | volptr, |
| int | length | ||
| ) |
| void BreakCallBack | ( | HostTable * | client, |
| ViceFid * | afid | ||
| ) |
| void ChangeDiskUsage | ( | Volume * | volptr, |
| int | length | ||
| ) |
| int CheckDiskUsage | ( | Volume * | volptr, |
| int | length | ||
| ) |
| CallBackStatus CodaAddCallBack | ( | HostTable * | VenusId, |
| ViceFid * | Fid, | ||
| VolumeId | VSGVolnum | ||
| ) |
| void CodaBreakCallBack | ( | HostTable * | VenusId, |
| ViceFid * | Fid, | ||
| VolumeId | VSGVolnum | ||
| ) |
| void CodaDeleteCallBack | ( | HostTable * | VenusId, |
| ViceFid * | Fid, | ||
| VolumeId | VSGVolnum | ||
| ) |
| void DeleteCallBack | ( | HostTable * | client, |
| ViceFid * | afid | ||
| ) |
| void DeleteFile | ( | ViceFid * | afid | ) |
| void DeleteVenus | ( | HostTable * | client | ) |
| void Die | ( | const char * | msg | ) |
| int GetEtherStats | ( | ) |
| int GetFsObj | ( | ViceFid * | fid, |
| Volume ** | volptr, | ||
| Vnode ** | vptr, | ||
| int | lock, | ||
| int | VolumeLock, | ||
| int | ignoreIncon, | ||
| int | ignoreBQ, | ||
| int | getdirhandle | ||
| ) |
| void GetMyVS | ( | Volume * | volptr, |
| RPC2_CountedBS * | VSList, | ||
| RPC2_Integer * | MyVS, | ||
| int | voltype | ||
| ) |
| int GetRights | ( | PRS_InternalCPS * | CPS, |
| AL_AccessList * | ACL, | ||
| int | ACLSize, | ||
| Rights * | rights, | ||
| Rights * | anyrights | ||
| ) |
| int GetVolObj | ( | VolumeId | Vid, |
| Volume ** | volptr, | ||
| int | LockLevel, | ||
| int | Enque = 0, |
||
| unsigned | LockerAddress = 0 |
||
| ) |
| int InitCallBack | ( | ) |
| void InitVolUtil | ( | int | stacksize | ) |
| long InternalCOP2 | ( | RPC2_Handle | cid, |
| ViceStoreId * | StoreId, | ||
| ViceVersionVector * | UpdateSet | ||
| ) |
| void NewCOP1Update | ( | Volume * | volptr, |
| Vnode * | vptr, | ||
| ViceStoreId * | StoreId, | ||
| RPC2_Integer * | vsptr = NULL, |
||
| bool | isReplicated = true |
||
| ) |
| void PollAndYield | ( | ) |
| void PrintCallBacks | ( | ViceFid * | fid, |
| FILE * | fp | ||
| ) |
| void PrintCallBackState | ( | FILE * | fp | ) |
| void PrintCounters | ( | FILE * | fp = stdout | ) |
| void PutVolObj | ( | Volume ** | volptr, |
| int | LockLevel, | ||
| int | Dequeue = 0 |
||
| ) |
| void SetStatus | ( | Vnode * | vptr, |
| ViceStatus * | status, | ||
| Rights | rights, | ||
| Rights | anyrights | ||
| ) |
| void SetVSStatus | ( | ClientEntry * | client, |
| Volume * | volptr, | ||
| RPC2_Integer * | NewVS, | ||
| CallBackStatus * | VCBStatus, | ||
| int | voltype | ||
| ) |
| void SwapLog | ( | int | ign | ) |
| void SwapMalloc | ( | ) |
| int SystemUser | ( | ClientEntry * | client | ) |
| int VCheckVLDB | ( | ) |
| char * ViceErrorMsg | ( | int | errorCode | ) |
| void ViceTerminate | ( | ) |
| void ViceUpdateDB | ( | ) |
| void VPrintCacheStats | ( | FILE * | fp = stdout | ) |
|
extern |
|
extern |
| int AnyUserId |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |