Whamcloud - gitweb
- make HEAD from b_post_cmd3
[fs/lustre-release.git] / lustre / osd / osd_internal.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  lustre/osd/osd_internal.h
5  *  Shared definitions and declarations for osd module
6  *
7  *  Copyright (c) 2006 Cluster File Systems, Inc.
8  *   Author: Nikita Danilov <nikita@clusterfs.com>
9  *
10  *   This file is part of the Lustre file system, http://www.lustre.org
11  *   Lustre is a trademark of Cluster File Systems, Inc.
12  *
13  *   You may have signed or agreed to another license before downloading
14  *   this software.  If so, you are bound by the terms and conditions
15  *   of that agreement, and the following does not apply to you.  See the
16  *   LICENSE file included with this distribution for more information.
17  *
18  *   If you did not agree to a different license, then this copy of Lustre
19  *   is open source software; you can redistribute it and/or modify it
20  *   under the terms of version 2 of the GNU General Public License as
21  *   published by the Free Software Foundation.
22  *
23  *   In either case, Lustre is distributed in the hope that it will be
24  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
25  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26  *   license text for more details.
27  */
28
29 #ifndef _OSD_INTERNAL_H
30 #define _OSD_INTERNAL_H
31
32 #if defined(__KERNEL__)
33
34 /* struct rw_semaphore */
35 #include <linux/rwsem.h>
36 /* handle_t, journal_start(), journal_stop() */
37 #include <linux/jbd.h>
38 /* struct dx_hash_info */
39 #include <linux/ldiskfs_fs.h>
40 /* struct dentry */
41 #include <linux/dcache.h>
42 #include <linux/lustre_iam.h>
43
44 #include <dt_object.h>
45 #include "osd_oi.h"
46
47 struct inode;
48
49 #define OSD_COUNTERS (0)
50
51 struct osd_thread_info {
52         const struct lu_env   *oti_env;
53
54         struct lu_fid          oti_fid;
55         struct osd_inode_id    oti_id;
56         /*
57          * XXX temporary: for ->i_op calls.
58          */
59         struct qstr            oti_str;
60         struct txn_param       oti_txn;
61         /*
62          * XXX temporary: fake dentry used by xattr calls.
63          */
64         struct dentry          oti_dentry;
65         struct timespec        oti_time;
66         /*
67          * XXX temporary: for capa operations.
68          */
69         struct lustre_capa_key oti_capa_key;
70         struct lustre_capa     oti_capa;
71
72         struct lu_fid_pack     oti_pack;
73
74         char                   oti_ipd[DX_IPD_MAX_SIZE];
75 #if OSD_COUNTERS
76         int                    oti_r_locks;
77         int                    oti_w_locks;
78         int                    oti_txns;
79 #endif
80 };
81
82 #endif /* __KERNEL__ */
83 #endif /* _OSD_INTERNAL_H */