Whamcloud - gitweb
Landing of b_recovery (at last).
[fs/lustre-release.git] / lustre / include / linux / lustre_import.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Copyright (C) 2001  Cluster File Systems, Inc.
5  *
6  * This code is issued under the GNU General Public License.
7  * See the file COPYING in this distribution
8  */
9
10 #ifndef __IMPORT_H
11 #define __IMPORT_H
12
13 #ifdef __KERNEL__
14
15 #define IMP_INVALID       1
16 #define IMP_REPLAYABLE    2
17
18 #include <linux/lustre_idl.h>
19 struct obd_import {
20         struct ptlrpc_connection *imp_connection;
21         struct ptlrpc_client     *imp_client;
22         struct lustre_handle      imp_handle;
23         struct list_head          imp_chain;
24         struct list_head          imp_request_list;
25         struct obd_device        *imp_obd;
26         int                       imp_flags;
27         int                       imp_level;
28         __u64                     imp_last_xid;
29         __u64                     imp_max_transno;
30         __u64                     imp_peer_last_xid;
31         __u64                     imp_peer_committed_transno;
32
33         /* Protects flags, level, *_xid, request_list */
34         spinlock_t                imp_lock;
35 };
36
37 extern struct obd_import *class_conn2cliimp(struct lustre_handle *);
38 extern struct obd_import *class_conn2ldlmimp(struct lustre_handle *);
39
40 #endif /* __KERNEL__ */
41
42 #endif /* __IMPORT_H */