vol: fix everything to use volumeid type
[openafs.git] / src / vol / voldefs.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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
8  */
9
10 /*
11         System:         VICE-TWO
12         Module:         voldefs.h
13         Institution:    The Information Technology Center, Carnegie-Mellon University
14
15  */
16
17 /* If you add volume types here, be sure to check the definition of
18    volumeWriteable in volume.h */
19
20 #define readwriteVolume         RWVOL
21 #define readonlyVolume          ROVOL
22 #define backupVolume            BACKVOL
23 #define rwreplicaVolume         RWREPL
24
25 #define RWVOL                   0
26 #define ROVOL                   1
27 #define BACKVOL                 2
28 #define RWREPL                  3
29
30 #define VOLMAXTYPES             4   /* _current_ max number of types */
31
32 /* the maximum number of volumes in a volume group that we can handle */
33 #define VOL_VG_MAX_VOLS 20
34
35 /* how many times to retry if we raced the fileserver restarting, when trying
36  * to checkout/lock a volume */
37 #define VOL_MAX_CHECKOUT_RETRIES 10
38
39 /* maximum numbe of Vice partitions */
40 #define VOLMAXPARTS     255
41
42 #define VFORMATDIGITS 10
43
44 /* All volumes will have a volume header name in this format */
45 #if     defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV)
46 /* Note that <afs/param.h> must have been included before we get here... */
47 #define VFORMAT "V%010" AFS_VOLID_FMT ".vl"     /* Sys5's filename length limitation hits us again */
48 #define VHDREXT ".vl"
49 #else
50 #define VFORMAT "V%010" AFS_VOLID_FMT ".vol"
51 #define VHDREXT ".vol"
52 #endif
53 #define VHDRNAMELEN (VFORMATDIGITS + 1 + sizeof(VHDREXT) - 1) /* must match VFORMAT */
54 #define VMAXPATHLEN 64          /* Maximum length (including null) of a volume
55                                  * external path name */
56
57 #if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV)
58 /* INODEDIR holds all the inodes. Since it's name does not begin with "V"
59  * and it's created when the first volume is created, linear directory
60  * searches will find the directory early. If only I had needed this before
61  * the NT server went beta, it could be used there as well.
62  */
63 #define INODEDIR "AFSIDat"
64 #define INODEDIRLEN (sizeof(INODEDIR)-1)
65 #endif
66
67 /* Pathname for the maximum volume id ever created by this server */
68 #define MAXVOLIDPATH    "/vice/vol/maxvolid"
69
70 /* Pathname for server id definitions--the server id is used to allocate volume numbers */
71 #define SERVERLISTPATH  "/vice/db/servers"