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
11 #include <sys/types.h>
14 #include <sys/statfs.h>
21 #include <netinet/in.h>
24 #include <afs/voldefs.h>
27 #include <afs/vlserver.h>
30 #include <afs/cellconfig.h>
33 #include <afs/afsint.h>
34 #include <afs/volser.h>
35 #include <afs/volint.h>
36 #include "../../volser/lockdata.h"
37 #include "../../vlserver/vlclient.h"
38 #include <afs/com_err.h>
40 #include <afs/kautils.h>
43 #include <afs/afs_Admin.h>
44 #include "../adminutil/afs_AdminInternal.h"
46 #define CLOCKSKEW 2 /* not really skew, but resolution */
48 extern int ubik_Call();
49 extern int ubik_Call_New();
52 extern int UV_NukeVolume(afs_cell_handle_p cellHandle,
53 struct rx_connection *server, unsigned int partition,
54 unsigned int volumeId, afs_status_p st);
56 extern int UV_CreateVolume(afs_cell_handle_p cellHandle,
57 struct rx_connection *server,
58 unsigned int partition, const char *volumeName,
59 unsigned int quota, unsigned int *volumeId,
62 extern int UV_DeleteVolume(afs_cell_handle_p cellHandle,
63 struct rx_connection *server,
64 unsigned int partition, unsigned int volumeId,
67 extern int UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
68 afs_int32 afromserver, afs_int32 afrompart,
69 afs_int32 atoserver, afs_int32 atopart,
72 extern int UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
73 afs_int32 apart, afs_int32 avolid,
76 extern int UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
77 afs_int32 afromserver, afs_int32 afrompart,
78 int forceflag, afs_status_p st);
80 extern int UV_DumpVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
81 afs_int32 afromserver, afs_int32 afrompart,
82 afs_int32 fromdate, const char *filename,
85 extern int UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
86 afs_int32 topart, afs_int32 tovolid,
87 const char *tovolname, int flags,
88 const char *dumpFile, afs_status_p st);
90 extern int UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server,
91 afs_int32 part, afs_int32 volid, afs_status_p st);
93 extern int UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server,
94 afs_int32 part, afs_int32 volid, afs_status_p st);
96 extern int UV_ListPartitions(struct rx_connection *server,
97 struct partList *ptrPartList, afs_int32 * cntp,
100 extern int UV_XListVolumes(struct rx_connection *server, afs_int32 a_partID,
101 int a_all, struct volintXInfo **a_resultPP,
102 afs_int32 * a_numEntsInResultP, afs_status_p st);
104 extern int UV_XListOneVolume(struct rx_connection *server, afs_int32 a_partID,
106 struct volintXInfo **a_resultPP,
109 extern int UV_ListOneVolume(struct rx_connection *server, afs_int32 a_partID,
110 afs_int32 a_volID, struct volintInfo **a_resultPP,
113 extern int UV_SyncVldb(afs_cell_handle_p cellHandle,
114 struct rx_connection *server, afs_int32 apart,
115 int flags, int force, afs_status_p st);
117 extern int CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
118 afs_int32 * modified, afs_status_p st);
120 extern int UV_SyncServer(afs_cell_handle_p cellHandle,
121 struct rx_connection *server, afs_int32 apart,
122 int flags, afs_status_p st);
125 extern int UV_VolserStatus(struct rx_connection *server,
126 transDebugInfo ** rpntr, afs_int32 * rcount,
129 extern int UV_VolumeZap(afs_cell_handle_p cellHandle,
130 struct rx_connection *serverHandle,
131 unsigned int partition, unsigned int volumeId,
134 extern int UV_SetVolume(struct rx_connection *server, afs_int32 partition,
135 afs_int32 volid, afs_int32 transflag,
136 afs_int32 setflag, unsigned int sleep,
139 extern int UV_RenameVolume(afs_cell_handle_p cellHandle,
140 struct nvldbentry *entry, const char *newname,