Whamcloud - gitweb
b=17167 cfs_rcu_head cleanup in lustre source
[fs/lustre-release.git] / lustre / include / liblustre.h
index bc91d39..b77e256 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
 #ifndef LIBLUSTRE_H__
 #define LIBLUSTRE_H__
 
+/** \defgroup liblustre liblustre
+ *
+ * @{
+ */
+#include <fcntl.h>
+#include <sys/queue.h>
+
 #ifdef __KERNEL__
 #error Kernel files should not #include <liblustre.h>
 #endif
@@ -130,8 +137,6 @@ extern int echo_client_init(void);
 
 #define EXPORT_SYMBOL(S)
 
-typedef struct cfs_rcu_head { } cfs_rcu_head_t;
-
 typedef __u64 kdev_t;
 
 #ifndef min
@@ -302,7 +307,6 @@ int cfs_curproc_is_in_groups(gid_t gid);
 #define daemonize(l) do {} while (0)
 #define sigfillset(l) do {} while (0)
 #define recalc_sigpending(l) do {} while (0)
-#define cfs_kernel_thread(l,m,n) LBUG()
 
 #define USERMODEHELPER(path, argv, envp) (0)
 #define SIGNAL_MASK_ASSERT()
@@ -332,10 +336,6 @@ int cfs_curproc_is_in_groups(gid_t gid);
 #define might_sleep_if(c)
 #define smp_mb()
 
-#define libcfs_memory_pressure_get() (0)
-#define libcfs_memory_pressure_put() do {} while (0)
-#define libcfs_memory_pressure_clr() do {} while (0)
-
 /* FIXME sys/capability will finally included linux/fs.h thus
  * cause numerous trouble on x86-64. as temporary solution for
  * build broken at Cray, we copy definition we need from capability.h
@@ -424,6 +424,16 @@ typedef struct file_lock {
 #define OFFSET_MAX      INT_LIMIT(loff_t)
 #endif
 
+#define i_atime                     i_stbuf.st_atime
+#define i_mtime                     i_stbuf.st_mtime
+#define i_ctime                     i_stbuf.st_ctime
+#define i_size                      i_stbuf.st_size
+#define i_blocks                    i_stbuf.st_blocks
+#define i_blksize                   i_stbuf.st_blksize
+#define i_mode                      i_stbuf.st_mode
+#define i_uid                       i_stbuf.st_uid
+#define i_gid                       i_stbuf.st_gid
+
 /* XXX: defined in kernel */
 #define FL_POSIX        1
 #define FL_SLEEP        128
@@ -511,6 +521,9 @@ static inline void set_fs(mm_segment_t seg)
 {
 }
 
+#define S_IRWXUGO       (S_IRWXU|S_IRWXG|S_IRWXO)
+#define S_IALLUGO       (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
+
 #include <obd_support.h>
 #include <lustre/lustre_idl.h>
 #include <lustre_lib.h>
@@ -518,4 +531,6 @@ static inline void set_fs(mm_segment_t seg)
 #include <lustre_export.h>
 #include <lustre_net.h>
 
+/** @} liblustre */
+
 #endif