Standardize License information
[openafs.git] / src / afs / IRIX / osi_inode.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  * Inode information required for IRIX servers and salvager.
12  */
13 #ifndef _OSI_INODE_H_
14 #define _OSI_INODE_H_
15
16 #define BAD_IGET        -1000
17
18 #define VICEMAGIC       0x84fa1cb6
19 /* chown can't set the high bit - used for XFS based filesystem */
20 #define XFS_VICEMAGIC   0x74fa1cb6
21
22 /* These exist because HP requires more work to extract uid. */
23 #define DI_VICEP3(p)    ( (p)->di_vicep3 )
24 #define I_VICE3(p)      ( (p)->i_vicep3 )
25
26
27 /*
28  * We use the 12 8-bit unused ex_magic fields!
29  * Plus 2 values of di_version
30  * di_version = 0 - current EFS
31  *          1 - AFS INODESPECIAL
32  *          2 - AFS inode
33  * AFS inode:
34  * magic[0-3] - VOLid
35  * magic[4-6] - vnode number (24 bits)
36  * magic[7-9] - disk uniqifier
37  * magic[10-11]+di_spare - data version
38  *
39  * INODESPECIAL:
40  * magic[0-3] - VOLid
41  * magic[4-7] - parent
42  * magic[8]   - type
43  */
44 #define SGI_UNIQMASK    0xffffff
45 #define SGI_DATAMASK     0xffffff
46 #define SGI_DISKMASK     0xffffff
47
48 /* we hang this struct off of the incore inode */
49 struct afsparms {
50         afs_int32 vicep1;
51         afs_int32 vicep2;
52         afs_int32 vicep3;
53         afs_int32 vicep4;
54     };
55
56 #define dmag(p,n)        ((p)->di_u.di_extents[n].ex_magic)
57
58 #define IS_VICEMAGIC(ip)        (((ip)->i_version == EFS_IVER_AFSSPEC || \
59                                   (ip)->i_version == EFS_IVER_AFSINO) \
60                                  ?  1 : 0)
61 #define IS_DVICEMAGIC(dp)       (((dp)->di_version == EFS_IVER_AFSSPEC || \
62                                   (dp)->di_version == EFS_IVER_AFSINO) \
63                                  ?  1 : 0)
64
65 #define  CLEAR_VICEMAGIC(ip)     (ip)->i_version = EFS_IVER_EFS
66 #define  CLEAR_DVICEMAGIC(dp)    dp->di_version = EFS_IVER_EFS
67
68 #endif /* _OSI_INODE_H_ */