Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / fid / fid_internal.h
1 /* -*- MODE: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  fid/fid_internal.h
5  *
6  *  Copyright (C) 2006 Cluster File Systems, Inc.
7  *   Author: Yury Umanets <umka@clusterfs.com>
8  *
9  *   This file is part of the Lustre file system, http://www.lustre.org
10  *   Lustre is a trademark of Cluster File Systems, Inc.
11  *
12  *   You may have signed or agreed to another license before downloading
13  *   this software.  If so, you are bound by the terms and conditions
14  *   of that agreement, and the following does not apply to you.  See the
15  *   LICENSE file included with this distribution for more information.
16  *
17  *   If you did not agree to a different license, then this copy of Lustre
18  *   is open source software; you can redistribute it and/or modify it
19  *   under the terms of version 2 of the GNU General Public License as
20  *   published by the Free Software Foundation.
21  *
22  *   In either case, Lustre is distributed in the hope that it will be
23  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
24  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25  *   license text for more details.
26  */
27 #ifndef __FID_INTERNAL_H
28 #define __FID_INTERNAL_H
29
30 #include <lustre/lustre_idl.h>
31 #include <dt_object.h>
32
33 #include <libcfs/libcfs.h>
34
35 #include <linux/types.h>
36
37 #ifdef __KERNEL__
38 struct seq_thread_info {
39         struct req_capsule     *sti_pill;
40         struct txn_param        sti_txn;
41         struct lu_range         sti_space;
42         struct lu_buf           sti_buf;
43 };
44
45 extern struct lu_context_key seq_thread_key;
46
47 /* Functions used internally in module. */
48 int seq_client_alloc_super(struct lu_client_seq *seq,
49                            const struct lu_env *env);
50
51 int seq_client_replay_super(struct lu_client_seq *seq,
52                             struct lu_range *range,
53                             const struct lu_env *env);
54
55 /* Store API functions. */
56 int seq_store_init(struct lu_server_seq *seq,
57                    const struct lu_env *env,
58                    struct dt_device *dt);
59
60 void seq_store_fini(struct lu_server_seq *seq,
61                     const struct lu_env *env);
62
63 int seq_store_write(struct lu_server_seq *seq,
64                     const struct lu_env *env);
65
66 int seq_store_read(struct lu_server_seq *seq,
67                    const struct lu_env *env);
68
69 #ifdef LPROCFS
70 extern struct lprocfs_vars seq_server_proc_list[];
71 extern struct lprocfs_vars seq_client_proc_list[];
72 #endif
73
74 #endif
75
76 extern cfs_proc_dir_entry_t *seq_type_proc_dir;
77
78 #endif /* __FID_INTERNAL_H */