DAFS: Maintain viced volume group hierarchy cache
[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
24 #define RWVOL                   0
25 #define ROVOL                   1
26 #define BACKVOL                 2
27
28 #define VOLMAXTYPES             3   /* _current_ max number of types */
29
30 /* the maximum number of volumes in a volume group that we can handle */
31 #define VOL_VG_MAX_VOLS 20
32
33 /* maximum numbe of Vice partitions */
34 #define VOLMAXPARTS     255
35
36 /* All volumes will have a volume header name in this format */
37 #if     defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV)
38 /* Note that <afs/param.h> must have been included before we get here... */
39 #define VFORMAT "V%010lu.vl"    /* Sys5's filename length limitation hits us again */
40 #define VHDREXT ".vl"
41 #else
42 #define VFORMAT "V%010lu.vol"
43 #define VHDREXT ".vol"
44 #endif
45 #define VMAXPATHLEN 64          /* Maximum length (including null) of a volume
46                                  * external path name */
47
48 #if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV)
49 /* INODEDIR holds all the inodes. Since it's name does not begin with "V"
50  * and it's created when the first volume is created, linear directory
51  * searches will find the directory early. If only I had needed this before
52  * the NT server went beta, it could be used there as well.
53  */
54 #define INODEDIR "AFSIDat"
55 #define INODEDIRLEN (sizeof(INODEDIR)-1)
56 #endif
57
58 /* Pathname for the maximum volume id ever created by this server */
59 #define MAXVOLIDPATH    "/vice/vol/maxvolid"
60
61 /* Pathname for server id definitions--the server id is used to allocate volume numbers */
62 #define SERVERLISTPATH  "/vice/db/servers"