static inline char * ptlrpc_import_state_name(enum lustre_imp_state state)
{
-
static char* import_state_names[] = {
- "<UNKNOWN>", "CLOSED", "NEW", "DISCONN",
- "CONNECTING", "REPLAY", "REPLAY_LOCKS", "REPLAY_WAIT",
+ "<UNKNOWN>", "CLOSED", "NEW", "DISCONN",
+ "CONNECTING", "REPLAY", "REPLAY_LOCKS", "REPLAY_WAIT",
"RECOVER", "FULL", "EVICTED",
};
IMP_EVENT_ACTIVE = 0x808004,
};
+struct ptlrpc_sec;
+
+struct obd_import_conn {
+ struct list_head oic_item;
+ struct ptlrpc_connection *oic_conn;
+ struct obd_uuid oic_uuid;
+ unsigned long oic_last_attempt; /* in jiffies */
+};
+
struct obd_import {
struct portals_handle imp_handle;
atomic_t imp_refcount;
struct list_head imp_sending_list;
struct list_head imp_delayed_list;
+ /* list of ongoing raw rpcs (only used by gss) */
+ struct list_head imp_rawrpc_list;
+
struct obd_device *imp_obd;
+ struct ptlrpc_sec *imp_sec;
wait_queue_head_t imp_recovery_waitq;
__u64 imp_last_replay_transno;
atomic_t imp_inflight;
struct lustre_handle imp_remote_handle;
unsigned long imp_next_ping;
unsigned long imp_connect_start;
-
+
+ /* all available obd_import_conn linked here */
+ struct list_head imp_conn_list;
+ struct obd_import_conn *imp_conn_current;
+
/* Protects flags, level, generation, conn_cnt, *_list */
spinlock_t imp_lock;
int imp_invalid:1, imp_replayable:1,
imp_dlm_fake:1, imp_server_timeout:1,
imp_initial_recov:1, imp_force_verify:1,
- imp_pingable:1, imp_resend_replay:1;
+ imp_pingable:1, imp_resend_replay:1,
+ imp_deactive:1,
+ imp_waiting_ping_reply:1,
+ imp_debug_open_replays:1;
__u32 imp_connect_op;
__u32 imp_connect_flags;
+ struct obd_connect_data imp_connect_data;
+
+ unsigned long imp_last_ping_xid;
+ int imp_reqs_replayed;
+ int imp_locks_replayed;
};
typedef void (*obd_import_callback)(struct obd_import *imp, void *closure,