Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / include / darwin / lustre_lite.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * lustre lite cluster file system
5  *
6  * This code is issued under the GNU General Public License.
7  * See the file COPYING in this distribution
8  *
9  * Copyright (C) 2002 Cluster File Systems, Inc. <info@clusterfs.com>
10  */
11
12
13
14 #ifndef _DARWIN_LL_H
15 #define _DARWIN_LL_H
16
17 #ifndef _LL_H
18 #error Do not #include this file directly. #include <lustre_lite.h> instead
19 #endif
20
21 #include <libcfs/libcfs.h>
22
23 #ifdef __KERNEL__
24
25 struct iattr {
26         unsigned int    ia_valid;
27         umode_t         ia_mode;
28         uid_t           ia_uid;
29         gid_t           ia_gid;
30         loff_t          ia_size;
31         time_t          ia_atime;
32         time_t          ia_mtime;
33         time_t          ia_ctime;
34         unsigned int    ia_attr_flags;
35 };
36
37 /*
38  * intent data-structured. For Linux they are defined in
39  * linux/include/linux/dcache.h
40  */
41 #define IT_OPEN     0x0001
42 #define IT_CREAT    0x0002
43 #define IT_READDIR  0x0004
44 #define IT_GETATTR  0x0008
45 #define IT_LOOKUP   0x0010
46 #define IT_UNLINK   0x0020
47 #define IT_GETXATTR 0x0040
48 #define IT_EXEC     0x0080
49 #define IT_PIN      0x0100
50
51 #define IT_FL_LOCKED   0x0001
52 #define IT_FL_FOLLOWED 0x0002 /* set by vfs_follow_link */
53
54 #define INTENT_MAGIC 0x19620323 /* Happy birthday! */
55
56 struct lustre_intent_data {
57         int     it_disposition;
58         int     it_status;
59         __u64   it_lock_handle;
60         void    *it_data;
61         int     it_lock_mode;
62 };
63
64 /*
65  * Liang: We keep the old lookup_intent struct in XNU 
66  * to avoid unnecessary allocate/free. 
67  */
68 #define LUSTRE_IT(it) ((struct lustre_intent_data *)(&(it)->d.lustre))
69
70 struct lookup_intent {
71         int     it_magic;
72         void    (*it_op_release)(struct lookup_intent *);
73         int     it_op;
74         int     it_flags;
75         int     it_create_mode;
76         union {
77                 struct lustre_intent_data lustre;
78                 void *fs_data;
79         } d;
80 };
81
82 struct super_operations{
83 };
84 #endif
85
86 #endif