Whamcloud - gitweb
- improved seq ranges debug messages, fixes in comments.
[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/list.h>
34 #include <libcfs/kp30.h>
35
36 #include <linux/types.h>
37
38 #ifdef __KERNEL__
39 struct seq_store_record {
40         struct lu_range ssr_space;
41         struct lu_range ssr_super;
42 };
43
44 struct seq_thread_info {
45         struct txn_param        sti_txn;
46         struct req_capsule      sti_pill;
47         struct seq_store_record sti_record;
48         int                     sti_rep_buf_size[REQ_MAX_FIELD_NR];
49         struct lu_buf           sti_buf;
50 };
51
52 extern struct lu_context_key seq_thread_key;
53
54 int seq_store_init(struct lu_server_seq *seq,
55                    const struct lu_env *env,
56                    struct dt_device *dt);
57
58 void seq_store_fini(struct lu_server_seq *seq,
59                     const struct lu_env *env);
60
61 int seq_store_write(struct lu_server_seq *seq,
62                     const struct lu_env *env);
63
64 int seq_store_read(struct lu_server_seq *seq,
65                    const struct lu_env *env);
66
67 #ifdef LPROCFS
68 extern struct lprocfs_vars seq_server_proc_list[];
69 extern struct lprocfs_vars seq_client_proc_list[];
70 #endif
71
72 #endif
73
74 extern cfs_proc_dir_entry_t *seq_type_proc_dir;
75
76 #endif /* __FID_INTERNAL_H */