Whamcloud - gitweb
mdt: move ESERIOUS deifnition to lustre_mdt.h
authornikita <nikita>
Fri, 13 Oct 2006 13:32:32 +0000 (13:32 +0000)
committernikita <nikita>
Fri, 13 Oct 2006 13:32:32 +0000 (13:32 +0000)
lustre/include/lu_object.h
lustre/include/lustre_mdt.h

index c6a3635..c4843c1 100644 (file)
 #include <libcfs/list.h>
 #include <libcfs/kp30.h>
 
-#define ESERIOUS 0x0001000
-static inline int err_serious(int rc)
-{
-        LASSERT(rc < 0);
-        LASSERT(-rc < ESERIOUS);
-        return -(-rc | ESERIOUS);
-}
-
-static inline int clear_serious(int rc)
-{
-        if (rc < 0)
-                rc = -(-rc & ~ESERIOUS);
-        return rc;
-}
-
-static inline int is_serious(int rc)
-{
-        return (rc < 0 && -rc & ESERIOUS);
-}
-
 /*
  * Layered objects support for CMD3/C5.
  */
 
-
 struct seq_file;
 struct proc_dir_entry;
 struct lustre_cfg;
index 8dc2d79..861a077 100644 (file)
@@ -25,8 +25,8 @@
 
 #include <lustre/lustre_idl.h>
 #include <lustre_req_layout.h>
-#include <md_object.h> 
-#include <dt_object.h> 
+#include <md_object.h>
+#include <dt_object.h>
 #include <libcfs/list.h>
 #include <libcfs/kp30.h>
 
@@ -58,4 +58,28 @@ struct mdt_idmap_table {
                                    [MDT_IDMAP_HASHSIZE];
 };
 
+enum {
+        ESERIOUS = 0x0001000
+};
+
+static inline int err_serious(int rc)
+{
+        LASSERT(rc < 0);
+        LASSERT(-rc < ESERIOUS);
+        return -(-rc | ESERIOUS);
+}
+
+static inline int clear_serious(int rc)
+{
+        if (rc < 0)
+                rc = -(-rc & ~ESERIOUS);
+        return rc;
+}
+
+static inline int is_serious(int rc)
+{
+        return (rc < 0 && -rc & ESERIOUS);
+}
+
+
 #endif