vol-osi-assert-20080401
[openafs.git] / src / vol / viceinode.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:         viceinode.h
13         Institution:    The Information Technology Center, Carnegie-Mellon University
14
15  */
16
17 #ifndef _VICEINODE_H_
18 #define _VICEINODE_H_
19
20 /* The four inode parameters for most inodes (files, directories,
21    symbolic links) */
22 struct InodeParams {
23     VolId volumeId;
24     VnodeId vnodeNumber;
25     Unique vnodeUniquifier;
26     FileVersion inodeDataVersion;
27 };
28
29 /* The four inode parameters for special inodes, i.e. the descriptive
30    inodes for a volume */
31 struct SpecialInodeParams {
32     VolId volumeId;
33     VnodeId vnodeNumber;        /* this must be INODESPECIAL */
34 #ifdef  AFS_3DISPARES
35     VolId parentId;
36     int type;
37 #else
38     int type;
39     VolId parentId;
40 #endif
41 };
42
43 /* Structure of individual records output by fsck.
44    When VICEMAGIC inodes are created, they are given four parameters;
45    these correspond to the params.fsck array of this record.
46  */
47 struct ViceInodeInfo {
48     Inode inodeNumber;
49     afs_fsize_t byteCount;
50     int linkCount;
51     union {
52         bit32 param[4];
53         struct InodeParams vnode;
54         struct SpecialInodeParams special;
55     } u;
56 };
57
58 #ifdef  AFS_3DISPARES
59 #define INODESPECIAL    0x1fffffff
60 #else
61 #define INODESPECIAL    0xffffffff
62 #endif
63 /* Special inode types.  Be careful of the ordering.  Must start at 1.
64    See vutil.h */
65 #define VI_VOLINFO      1       /* The basic volume information file */
66 #define VI_SMALLINDEX   2       /* The index of small vnodes */
67 #define VI_LARGEINDEX   3       /* The index of large vnodes */
68 #define VI_ACL          4       /* The volume's access control list */
69 #define VI_MOUNTTABLE   5       /* The volume's mount table */
70 #define VI_LINKTABLE    6       /* The volume's link counts */
71
72 #endif /* _VICEINODE_H_ */