2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef AFS_SRC_VOLSER_INTERNAL_H
11 #define AFS_SRC_VOLSER_INTERNAL_H
14 extern void Log(const char *, ...) AFS_ATTRIBUTE_FORMAT(__printf__
, 1, 2);
15 extern void InitErrTabs(void);
18 extern afs_int32
split_volume(struct rx_call
*, Volume
*, Volume
*,
19 afs_uint32
, afs_int32
);
22 extern struct volser_trans
*FindTrans(afs_int32
);
23 extern struct volser_trans
*NewTrans(afs_uint32
, afs_int32
);
24 extern struct volser_trans
*TransList(void);
25 extern afs_int32
DeleteTrans(struct volser_trans
*atrans
, afs_int32 lock
);
26 extern afs_int32
TRELE (struct volser_trans
*);
29 extern int VPFullUnlock(void);
32 extern afs_int32
GCTrans(void);
36 extern int yesprompt(char *str
);
37 extern int PrintError(char *msg
, afs_int32 errcode
);
38 extern void init_volintInfo(struct volintInfo
*vinfo
);
39 extern void SubEnumerateEntry(struct nvldbentry
*entry
);
40 extern void EnumerateEntry(struct nvldbentry
*entry
);
41 extern int UV_NukeVolume(afs_uint32 server
, afs_int32 partid
, afs_uint32 volid
);
42 extern int UV_PartitionInfo64(afs_uint32 server
, char *pname
,
43 struct diskPartition64
*partition
);
44 extern int UV_CreateVolume2(afs_uint32 aserver
, afs_int32 apart
, char *aname
,
45 afs_int32 aquota
, afs_int32 aspare1
,
46 afs_int32 aspare2
, afs_int32 aspare3
,
47 afs_int32 aspare4
, afs_uint32
* anewid
);
48 extern int UV_CreateVolume3(afs_uint32 aserver
, afs_int32 apart
, char *aname
,
49 afs_int32 aquota
, afs_int32 aspare1
,
50 afs_int32 aspare2
, afs_int32 aspare3
,
51 afs_int32 aspare4
, afs_uint32
* anewid
,
52 afs_uint32
* aroid
, afs_uint32
* abkid
);
53 extern int UV_AddVLDBEntry(afs_uint32 aserver
, afs_int32 apart
, char *aname
,
55 extern int UV_MoveVolume(afs_uint32 afromvol
, afs_uint32 afromserver
,
56 afs_int32 afrompart
, afs_uint32 atoserver
,
58 extern int UV_MoveVolume2(afs_uint32 afromvol
, afs_uint32 afromserver
,
59 afs_int32 afrompart
, afs_uint32 atoserver
,
60 afs_int32 atopart
, int flags
);
61 extern int UV_BackupVolume(afs_uint32 aserver
, afs_int32 apart
,
63 extern int UV_ReleaseVolume(afs_uint32 afromvol
, afs_uint32 afromserver
,
64 afs_int32 afrompart
, int forceflag
, int upflag
);
65 extern void dump_sig_handler(int x
);
66 extern int UV_DumpVolume(afs_uint32 afromvol
, afs_uint32 afromserver
,
67 afs_int32 afrompart
, afs_int32 fromdate
,
68 afs_int32(*DumpFunction
) (struct rx_call
*, void *),
69 void *rock
, afs_int32 flags
);
70 extern int UV_RestoreVolume2(afs_uint32 toserver
, afs_int32 topart
,
71 afs_uint32 tovolid
, afs_uint32 toparentid
,
72 char tovolname
[], int flags
,
73 afs_int32(*WriteData
) (struct rx_call
*, void *),
75 extern int UV_LockRelease(afs_uint32 volid
);
76 extern int UV_AddSite(afs_uint32 server
, afs_int32 part
, afs_uint32 volid
,
78 extern int UV_AddSite2(afs_uint32 server
, afs_int32 part
, afs_uint32 volid
,
79 afs_uint32 rovolid
, afs_int32 valid
);
80 extern int UV_RemoveSite(afs_uint32 server
, afs_int32 part
, afs_uint32 volid
);
81 extern int UV_ChangeLocation(afs_uint32 server
, afs_int32 part
,
83 extern int UV_ListPartitions(afs_uint32 aserver
, struct partList
*ptrPartList
,
85 extern int UV_ZapVolumeClones(afs_uint32 aserver
, afs_int32 apart
,
86 struct volDescription
*volPtr
,
88 extern int UV_GenerateVolumeClones(afs_uint32 aserver
, afs_int32 apart
,
89 struct volDescription
*volPtr
,
91 extern int UV_ListVolumes(afs_uint32 aserver
, afs_int32 apart
, int all
,
92 struct volintInfo
**resultPtr
, afs_int32
* size
);
93 extern int UV_XListVolumes(afs_uint32 a_serverID
, afs_int32 a_partID
,
94 int a_all
, struct volintXInfo
**a_resultPP
,
95 afs_int32
* a_numEntsInResultP
);
96 extern int UV_XListOneVolume(afs_uint32 a_serverID
, afs_int32 a_partID
,
98 struct volintXInfo
**a_resultPP
);
99 extern int sortVolumes(const void *a
, const void *b
);
100 extern int UV_SyncVolume(afs_uint32 aserver
, afs_int32 apart
, char *avolname
,
102 extern int UV_SyncVldb(afs_uint32 aserver
, afs_int32 apart
, int flags
,
104 extern afs_int32
VolumeExists(afs_uint32 server
, afs_int32 partition
,
105 afs_uint32 volumeid
);
106 extern afs_int32
CheckVldbRWBK(struct nvldbentry
*entry
,
107 afs_int32
* modified
);
108 extern int CheckVldbRO(struct nvldbentry
*entry
, afs_int32
* modified
);
109 extern afs_int32
CheckVldb(struct nvldbentry
*entry
, afs_int32
* modified
,
111 extern int UV_SyncServer(afs_uint32 aserver
, afs_int32 apart
, int flags
,
113 extern int UV_RenameVolume(struct nvldbentry
*entry
, char oldname
[],
115 extern int UV_VolserStatus(afs_uint32 server
, transDebugInfo
** rpntr
,
117 extern int UV_VolumeZap(afs_uint32 server
, afs_int32 part
, afs_uint32 volid
);
118 extern int UV_SetVolume(afs_uint32 server
, afs_int32 partition
,
119 afs_uint32 volid
, afs_int32 transflag
,
120 afs_int32 setflag
, int sleeptime
);
121 extern int UV_SetVolumeInfo(afs_uint32 server
, afs_int32 partition
,
122 afs_uint32 volid
, volintInfo
* infop
);
123 extern void MapNetworkToHost(struct nvldbentry
*old
, struct nvldbentry
*new);
124 extern int UV_CopyVolume2(afs_uint32 afromvol
, afs_uint32 afromserver
,
125 afs_int32 afrompart
, char *atovolname
,
126 afs_uint32 atoserver
, afs_int32 atopart
,
127 afs_uint32 atovolid
, int flags
);
128 extern int UV_CloneVolume(afs_uint32 aserver
, afs_int32 apart
, afs_uint32 avolid
,
129 afs_uint32 acloneid
, char *aname
, int flags
);
130 extern int UV_DumpClonedVolume(afs_uint32 afromvol
, afs_uint32 afromserver
,
131 afs_int32 afrompart
, afs_int32 fromdate
,
132 afs_int32(*DumpFunction
)
133 (struct rx_call
*, void *),
134 void *rock
, afs_int32 flags
);
135 extern int UV_GetSize(afs_uint32 afromvol
, afs_uint32 afromserver
,
136 afs_int32 afrompart
, afs_int32 fromdate
,
137 struct volintSize
*vol_size
);
140 extern int noresolve
;