Whamcloud - gitweb
LU-3527 nodemap: add nodemap kernel module
[fs/lustre-release.git] / lustre / nodemap / nodemap_internal.h
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
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.
9  *
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).
15  *
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
19  *
20  * GPL HEADER END
21  */
22 /*
23  * Copyright (C) 2013, Trustees of Indiana University
24  * Author: Joshua Walgenbach <jjw@iu.edu>
25  */
26
27 #ifndef _NODEMAP_INTERNAL_H
28 #define _NODEMAP_INTERNAL_H
29
30 #include <lustre_nodemap.h>
31
32 #define MODULE_STRING "nodemap"
33
34 /* Default nobody uid and gid values */
35
36 #define NODEMAP_NOBODY_UID 99
37 #define NODEMAP_NOBODY_GID 99
38
39 struct lprocfs_static_vars;
40
41 /* nodemap root proc directory under fs/lustre */
42 extern struct proc_dir_entry *proc_lustre_nodemap_root;
43 /* flag if nodemap is active */
44 extern bool nodemap_idmap_active;
45
46 int nodemap_procfs_init(void);
47 int lprocfs_nodemap_register(const char *name, bool is_default_nodemap,
48                              struct lu_nodemap *nodemap);
49 int nodemap_cleanup_nodemaps(void);
50 #endif  /* _NODEMAP_INTERNAL_H */