Whamcloud - gitweb
Branch 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 #ifndef _DARWIN_LL_H
13 #define _DARWIN_LL_H
14
15 #ifndef _LL_H
16 #error Do not #include this file directly. #include <lustre_lite.h> instead
17 #endif
18
19 #include <libcfs/libcfs.h>
20
21 #ifdef __KERNEL__
22
23 struct iattr {
24         unsigned int    ia_valid;
25         umode_t         ia_mode;
26         uid_t           ia_uid;
27         gid_t           ia_gid;
28         loff_t          ia_size;
29         time_t          ia_atime;
30         time_t          ia_mtime;
31         time_t          ia_ctime;
32         unsigned int    ia_attr_flags;
33 };
34
35 /*
36  * intent data-structured. For Linux they are defined in
37  * linux/include/linux/dcache.h
38  */
39 #define IT_OPEN     0x0001
40 #define IT_CREAT    0x0002
41 #define IT_READDIR  0x0004
42 #define IT_GETATTR  0x0008
43 #define IT_LOOKUP   0x0010
44 #define IT_UNLINK   0x0020
45 #define IT_GETXATTR 0x0040
46 #define IT_EXEC     0x0080
47 #define IT_PIN      0x0100
48
49 #define IT_FL_LOCKED   0x0001
50 #define IT_FL_FOLLOWED 0x0002 /* set by vfs_follow_link */
51
52 #define INTENT_MAGIC 0x19620323 /* Happy birthday! */
53
54 struct lustre_intent_data {
55         int     it_disposition;
56         int     it_status;
57         __u64   it_lock_handle;
58         void    *it_data;
59         int     it_lock_mode;
60 };
61
62 /*
63  * Liang: We keep the old lookup_intent struct in XNU 
64  * to avoid unnecessary allocate/free. 
65  */
66 #define LUSTRE_IT(it) ((struct lustre_intent_data *)(&(it)->d.lustre))
67
68 struct lookup_intent {
69         int     it_magic;
70         void    (*it_op_release)(struct lookup_intent *);
71         int     it_op;
72         int     it_flags;
73         int     it_create_mode;
74         union {
75                 struct lustre_intent_data lustre;
76                 void *fs_data;
77         } d;
78 };
79
80 struct super_operations{
81 };
82 #endif
83
84 #endif