afsconfig-and-rcsid-all-around-20010705
[openafs.git] / src / vol / volinodes.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:         volinodes.h
13         Institution:    The Information Technology Center, Carnegie-Mellon University
14
15  */
16
17 /* Used by vutil.c and salvager.c */
18
19 private struct VolumeHeader tempHeader;
20
21 #ifdef AFS_NAMEI_ENV
22 #define NO_LINK_TABLE 0
23 #else
24 #define NO_LINK_TABLE 1
25 #endif
26 private struct stuff {
27     struct versionStamp stamp;
28     bit32       inodeType;
29     int         size;   /* size of any fixed size portion of the header */
30     Inode       *inode;
31     char        *description;
32     /* if this is 1, then this inode is obsolete--
33      * salvager may delete it, and shouldn't complain
34      * if it isn't there; create can not bother to create it */
35     int         obsolete;
36 } stuff[] = {
37     {{VOLUMEINFOMAGIC,VOLUMEINFOVERSION}, VI_VOLINFO, sizeof(VolumeDiskData),
38       &tempHeader.volumeInfo, "Volume information", 0}, 
39     {{SMALLINDEXMAGIC,SMALLINDEXVERSION},VI_SMALLINDEX,sizeof(struct versionStamp),
40       &tempHeader.smallVnodeIndex, "small inode index", 0},
41     {{LARGEINDEXMAGIC,LARGEINDEXVERSION},VI_LARGEINDEX,sizeof(struct versionStamp),
42       &tempHeader.largeVnodeIndex, "large inode index", 0},
43     {{ACLMAGIC,ACLVERSION},VI_ACL,sizeof(struct versionStamp),
44       &tempHeader.volumeAcl, "access control list", 1},
45     {{MOUNTMAGIC,MOUNTVERSION},VI_MOUNTTABLE,sizeof(struct versionStamp),
46       &tempHeader.volumeMountTable, "mount table", 1},
47     {{LINKTABLEMAGIC,LINKTABLEVERSION},VI_LINKTABLE,
48          sizeof(struct versionStamp),
49       &tempHeader.linkTable, "link table", NO_LINK_TABLE},
50 };
51 /* inodeType is redundant in the above table;  it used to be useful, but now
52    we require the table to be ordered */
53 #define MAXINODETYPE VI_LINKTABLE
54
55 Volume *VWaitAttachVolume();