2 * (C) COPYRIGHT IBM CORPORATION 1988
3 * LICENSED MATERIALS - PROPERTY OF IBM
8 * Instituition: ITC, CMU
16 #define VOLCREATEVOLUME 100
17 #define VOLDELETEVOLUME 101
18 #define VOLRESTORE 102
19 #define VOLFORWARD 103
20 #define VOLENDTRANS 104
22 #define VOLSETFLAGS 106
23 #define VOLGETFLAGS 107
24 #define VOLTRANSCREATE 108
26 #define VOLGETNTHVOLUME 110
27 #define VOLSETFORWARDING 111 /* defunct */
28 #define VOLGETNAME 112
29 #define VOLGETSTATUS 113
30 #define VOLSIGRESTORE 114
31 #define VOLLISTPARTITIONS 115
32 #define VOLLISTVOLS 116
33 #define VOLSETIDSTYPES 117
34 #define VOLMONITOR 118
35 #define VOLDISKPART 119
36 #define VOLRECLONE 120
37 #define VOLLISTONEVOL 121
39 #define VOLSETDATE 123
40 #define VOLXLISTVOLS 124
41 #define VOLXLISTONEVOL 125
42 #define VOLSETINFO 126
43 #define VOLXLISTPARTITIONS 127
44 #define VOLFORWARDMULTIPLE 128
48 struct volser_status {
49 afs_int32 volID; /* Volume id--unique over all systems */
50 afs_int32 nextUnique; /* Next vnode uniquifier for this volume */
51 int type; /* readwrite, etc. */
52 afs_int32 parentID; /* Id of parent, if type==readonly or backup */
53 afs_int32 cloneID; /* Latest read-only clone, if type==readwrite */
54 afs_int32 backupID; /* Latest backup copy of this read write volume */
55 afs_int32 restoredFromID; /* The id in a dump this volume was restored from--used simply
56 to make sure that an incremental dump is not restored on top
57 of something inappropriate: Note: this field itself is NEVER
59 afs_int32 maxQuota; /* Quota maximum, 1K blocks */
60 afs_int32 minQuota; /* Quota minimum, 1K blocks */
61 afs_int32 owner; /* The person responsible for this volume */
62 afs_int32 creationDate; /* Creation date for a read/write
63 volume; cloning date for original copy of
64 a readonly volume (replicated volumes have
65 the same creation date) */
66 afs_int32 accessDate; /* Last access time by a user, large granularity */
67 afs_int32 updateDate; /* Last modification by user */
68 afs_int32 expirationDate; /* 0 if it never expires */
69 afs_int32 backupDate; /* last time a backup clone was taken */
70 afs_int32 copyDate; /* Time that this copy of this volume was created */
83 afs_int32 volid; /* volume's id */
84 afs_int32 type; /* read-only, read-write, backup */
91 unsigned char needsSalvaged;
92 unsigned char destroyMe;
93 afs_int32 creationDate;
101 afs_int32 flags; /* used by the backup system */
102 afs_int32 spare0; /* Used to hold the minquota value */
103 afs_int32 spare1; /* Used to hold the weekuse value */
109 * Define some values needed for the detailed volume info structure.
111 const VOLINT_STATS_NUM_RWINFO_FIELDS = 4;
113 const VOLINT_STATS_SAME_NET = 0; /*Within same site (total)*/
114 const VOLINT_STATS_SAME_NET_AUTH = 1; /*Within same site (authenticated);
115 (must be 1 more than above)*/
116 const VOLINT_STATS_DIFF_NET = 2; /*From external site (total)*/
117 const VOLINT_STATS_DIFF_NET_AUTH = 3; /*From external site (authenticated)
118 (must be 1 more than above)*/
120 const VOLINT_STATS_NUM_TIME_RANGES = 6;
122 const VOLINT_STATS_TIME_CAP_0 = 60; /*60 seconds*/
123 const VOLINT_STATS_TIME_CAP_1 = 600; /*10 minutes, in seconds*/
124 const VOLINT_STATS_TIME_CAP_2 = 3600; /*1 hour, in seconds*/
125 const VOLINT_STATS_TIME_CAP_3 = 86400; /*1 day, in seconds*/
126 const VOLINT_STATS_TIME_CAP_4 = 604800; /*1 week, in seconds*/
128 const VOLINT_STATS_NUM_TIME_FIELDS = 6;
130 const VOLINT_STATS_TIME_IDX_0 = 0; /*0 secs to 60 secs*/
131 const VOLINT_STATS_TIME_IDX_1 = 1; /*1 min to 10 mins*/
132 const VOLINT_STATS_TIME_IDX_2 = 2; /*10 mins to 60 mins*/
133 const VOLINT_STATS_TIME_IDX_3 = 3; /*1 hr to 24 hrs*/
134 const VOLINT_STATS_TIME_IDX_4 = 4; /*1 day to 7 days*/
135 const VOLINT_STATS_TIME_IDX_5 = 5; /*Greater than 1 week*/
138 * More detailed volume info
141 char name[VNAMESIZE];
142 afs_int32 volid; /*Volume's ID*/
143 afs_int32 type; /*RWVOL, ROVOL, BACKVOL*/
144 afs_int32 backupID; /*Backup volume ID*/
145 afs_int32 parentID; /*Parent volume ID*/
146 afs_int32 cloneID; /*Clone volume ID*/
147 afs_int32 status; /*Volume status*/
148 afs_int32 copyDate; /*Date when this volume INSTANCE created*/
149 unsigned char inUse; /*In use at time of last crash?*/
150 afs_int32 creationDate; /*Date when this volume was created*/
151 afs_int32 accessDate; /*Date when this volume was last accessed*/
152 afs_int32 updateDate; /*Date when this volume was last updated*/
153 afs_int32 backupDate; /*Date when this volume was last backed up*/
154 int dayUse; /*Number of accesses since midnight*/
155 int filecount; /*Number of files in the volume*/
156 int maxquota; /*Max volume quota, in Kbytes*/
157 int size; /*Current size in Kbytes*/
159 * Detailed statistics for reads/writes and authorship.
161 afs_int32 stat_reads[VOLINT_STATS_NUM_RWINFO_FIELDS];
162 afs_int32 stat_writes[VOLINT_STATS_NUM_RWINFO_FIELDS];
163 afs_int32 stat_fileSameAuthor[VOLINT_STATS_NUM_TIME_FIELDS];
164 afs_int32 stat_fileDiffAuthor[VOLINT_STATS_NUM_TIME_FIELDS];
165 afs_int32 stat_dirSameAuthor[VOLINT_STATS_NUM_TIME_FIELDS];
166 afs_int32 stat_dirDiffAuthor[VOLINT_STATS_NUM_TIME_FIELDS];
169 struct transDebugInfo {
170 afs_int32 tid; /*transaction id */
171 afs_int32 time; /* time transaction was last active (for timeouts) */
172 afs_int32 creationTime; /* time the transaction started */
173 afs_int32 returnCode; /* transaction error code */
174 afs_int32 volid; /*sequence number of the next packet to be read*/ /* open volume's id */
175 afs_int32 partition; /* open volume's partition */
176 short iflags; /* initial attach mode flags (IT*) */
177 char vflags; /* current volume status flags (VT*) */
178 char tflags; /* transaction flags (TT*) */
179 char lastProcName[30]; /* name of the last procedure which used transaction */
180 int callValid; /*flag which determines if following data is valid*/
181 afs_int32 readNext; /*sequence number of the next packet to be read*/
182 afs_int32 transmitNext; /*sequence number of the next packet to be transmitted*/
188 afs_int32 partIds[26];
191 struct diskPartition {
192 char name[32]; /* Mounted partition name */
201 struct restoreCookie {
210 struct destServer server;
213 typedef replica manyDests<>;
214 typedef afs_int32 manyResults<>;
215 typedef transDebugInfo transDebugEntries<>;
216 typedef volintInfo volEntries<>;
217 typedef afs_int32 partEntries<>;
218 typedef volintXInfo volXEntries<>;
221 IN afs_int32 partition,
225 INOUT afs_int32 *volid,
234 IN afs_int32 toTrans,
236 IN struct restoreCookie *cookie
237 ) split = VOLRESTORE;
240 IN afs_int32 fromTrans,
241 IN afs_int32 fromDate,
242 IN struct destServer *destination,
243 IN afs_int32 destTrans,
244 IN struct restoreCookie *cookie
254 IN afs_int32 purgeVol,
255 IN afs_int32 newType,
257 INOUT afs_int32 *newVol
272 IN afs_int32 partition,
278 IN afs_int32 fromTrans,
279 IN afs_int32 fromDate
284 OUT afs_int32 *volume,
285 OUT afs_int32 *partition
291 ) = VOLSETFORWARDING;
295 OUT string tname<256>
300 OUT struct volser_status *status
311 OUT struct pIDs *partIDs
312 ) = VOLLISTPARTITIONS;
317 OUT volEntries *resultEntries
330 OUT transDebugEntries *result
335 OUT struct diskPartition *partition
346 OUT volEntries *resultEntries
362 OUT volXEntries *resultXEntriesP
368 OUT volXEntries *resultXEntries
373 struct volintInfo *status
376 proc XListPartitions(
377 OUT struct partEntries *partIDs
378 ) = VOLXLISTPARTITIONS;
380 proc ForwardMultiple(
381 IN afs_int32 fromTrans,
382 IN afs_int32 fromDate,
383 IN manyDests *destinations,
385 IN struct restoreCookie *cookie,
386 OUT manyResults *results
387 ) = VOLFORWARDMULTIPLE;