Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / include / linux / lustre_import.h
index 255c238..4fc2581 100644 (file)
 #ifndef __IMPORT_H
 #define __IMPORT_H
 
-#ifdef __KERNEL__
 
-#define IMP_INVALID 1
+#define IMP_INVALID       1
+#define IMP_REPLAYABLE    2
 
+
+struct obd_import;
+typedef int (*import_recover_t)(struct obd_import *imp, int phase);
 #include <linux/lustre_idl.h>
+
 struct obd_import {
+        import_recover_t          imp_recover;
         struct ptlrpc_connection *imp_connection;
         struct ptlrpc_client     *imp_client;
         struct lustre_handle      imp_handle;
         struct list_head          imp_chain;
+
+        /* Lists of requests that are retained for replay, waiting for a reply,
+         * or waiting for recovery to complete, respectively.
+         */
+        struct list_head          imp_replay_list;
+        struct list_head          imp_sending_list;
+        struct list_head          imp_delayed_list;
+
         struct obd_device        *imp_obd;
         int                       imp_flags;
-        /* XXX need a UUID here, I think */
+        int                       imp_level;
+        __u64                     imp_max_transno;
+        __u64                     imp_peer_committed_transno;
+
+        /* Protects flags, level, *_list */
+        spinlock_t                imp_lock;
 };
 
 extern struct obd_import *class_conn2cliimp(struct lustre_handle *);
 extern struct obd_import *class_conn2ldlmimp(struct lustre_handle *);
 
-#endif /* __KERNEL__ */
 
 #endif /* __IMPORT_H */