Whamcloud - gitweb
LU-2914 lfsck: split LFSCK code from mdd to lfsck
[fs/lustre-release.git] / lustre / include / lustre_lfsck.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,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License version 2 for more details.  A copy is
14  * included in the COPYING file that accompanied this code.
15
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * GPL HEADER END
21  */
22 /*
23  * Copyright (c) 2013, Intel Corporation.
24  */
25 /*
26  * lustre/include/lustre_lfsck.h
27  *
28  * Lustre LFSCK exported functions.
29  *
30  * Author: Fan, Yong <fan.yong@intel.com>
31  */
32
33 #ifndef _LUSTRE_LFSCK_H
34 # define _LUSTRE_LFSCK_H
35
36 #include <lustre/lustre_lfsck_user.h>
37 #include <lustre_dlm.h>
38 #include <lu_object.h>
39 #include <dt_object.h>
40
41 struct lfsck_start_param {
42         struct lfsck_start      *lsp_start;
43         struct ldlm_namespace   *lsp_namespace;
44 };
45
46 int lfsck_register(const struct lu_env *env, struct dt_device *key,
47                    struct dt_device *next, bool master);
48 void lfsck_degister(const struct lu_env *env, struct dt_device *key);
49
50 int lfsck_start(const struct lu_env *env, struct dt_device *key,
51                 struct lfsck_start_param *lsp);
52 int lfsck_stop(const struct lu_env *env, struct dt_device *key,
53                bool pause);
54
55 int lfsck_get_speed(struct dt_device *key, void *buf, int len);
56 int lfsck_set_speed(struct dt_device *key, int val);
57
58 int lfsck_dump(struct dt_device *key, void *buf, int len, __u16 type);
59
60 #endif /* _LUSTRE_LFSCK_H */