4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License version 2 for more details (a copy is included
14 * in the LICENSE file that accompanied this code).
16 * You should have received a copy of the GNU General Public License
17 * version 2 along with this program; If not, see
18 * http://www.gnu.org/licenses/gpl-2.0.html
23 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Use is subject to license terms.
26 * Copyright (c) 2012, 2014, Intel Corporation.
29 * This file is part of Lustre, http://www.lustre.org/
31 * lustre/fid/fid_internal.h
33 * Author: Yury Umanets <umka@clusterfs.com>
35 #ifndef __FID_INTERNAL_H
36 #define __FID_INTERNAL_H
38 #include <libcfs/libcfs.h>
40 #ifdef HAVE_SERVER_SUPPORT
41 # define HAVE_SEQ_SERVER
45 struct seq_thread_info {
46 struct req_capsule *sti_pill;
47 struct lu_seq_range sti_space;
48 struct lu_buf sti_buf;
52 SEQ_TXN_STORE_CREDITS = 20
55 extern struct lu_context_key seq_thread_key;
57 extern struct ldebugfs_vars seq_server_debugfs_list[];
59 /* Store API functions. */
62 int seq_store_init(struct lu_server_seq *seq,
63 const struct lu_env *env,
64 struct dt_device *dt);
66 void seq_store_fini(struct lu_server_seq *seq,
67 const struct lu_env *env);
69 int seq_store_read(struct lu_server_seq *seq,
70 const struct lu_env *env);
72 int seq_store_update(const struct lu_env *env, struct lu_server_seq *seq,
73 struct lu_seq_range *out, int sync);
75 int seq_server_alloc_spec(struct lu_server_seq *seq,
76 struct lu_seq_range *spec,
77 const struct lu_env *env);
79 int fid_server_mod_init(void);
81 void fid_server_mod_exit(void);
83 # endif /* HAVE_SERVER_SUPPORT */
85 /* Functions used internally in module. */
86 int seq_client_alloc_super(struct lu_client_seq *seq,
87 const struct lu_env *env);
89 extern struct dentry *seq_debugfs_dir;
91 extern struct ldebugfs_vars seq_client_debugfs_list[];
93 extern const struct file_operations seq_fld_debugfs_seq_fops;
95 #endif /* __FID_INTERNAL_H */