Whamcloud - gitweb
LU-1095 debug: Common client/server message standardization
[fs/lustre-release.git] / lustre / include / lustre_param.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * GPL HEADER START
5  *
6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 only,
10  * as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License version 2 for more details (a copy is included
16  * in the LICENSE file that accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License
19  * version 2 along with this program; If not, see
20  * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
21  *
22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23  * CA 95054 USA or visit www.sun.com if you need additional information or
24  * have any questions.
25  *
26  * GPL HEADER END
27  */
28 /*
29  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
30  * Use is subject to license terms.
31  *
32  * Copyright (c) 2011, Whamcloud, Inc.
33  */
34 /*
35  * This file is part of Lustre, http://www.lustre.org/
36  * Lustre is a trademark of Sun Microsystems, Inc.
37  *
38  * lustre/include/lustre_param.h
39  *
40  * User-settable parameter keys
41  *
42  * Author: Nathan Rutman <nathan@clusterfs.com>
43  */
44
45 #ifndef _LUSTRE_PARAM_H
46 #define _LUSTRE_PARAM_H
47
48 /** \defgroup param param
49  *
50  * @{
51  */
52
53 /* obd_config.c */
54 int class_find_param(char *buf, char *key, char **valp);
55 int class_get_next_param(char **params, char *copy);
56 int class_match_param(char *buf, char *key, char **valp);
57 int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh);
58 int class_parse_net(char *buf, __u32 *net, char **endh);
59 int class_match_nid(char *buf, char *key, lnet_nid_t nid);
60 int class_match_net(char *buf, char *key, __u32 net);
61 /* obd_mount.c */
62 int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd,
63             char *s1, char *s2, char *s3, char *s4);
64
65
66
67 /****************** User-settable parameter keys *********************/
68 /* e.g.
69         tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda
70         lctl conf_param testfs-OST0000 failover.node=3@elan,192.168.0.3@tcp0
71                     ... testfs-MDT0000.lov.stripesize=4M
72                     ... testfs-OST0000.ost.client_cache_seconds=15
73                     ... testfs.sys.timeout=<secs>
74                     ... testfs.llite.max_read_ahead_mb=16
75 */
76
77 /* System global or special params not handled in obd's proc
78  * See mgs_write_log_sys()
79  */
80 #define PARAM_TIMEOUT              "timeout="          /* global */
81 #define PARAM_LDLM_TIMEOUT         "ldlm_timeout="     /* global */
82 #define PARAM_AT_MIN               "at_min="           /* global */
83 #define PARAM_AT_MAX               "at_max="           /* global */
84 #define PARAM_AT_EXTRA             "at_extra="         /* global */
85 #define PARAM_AT_EARLY_MARGIN      "at_early_margin="  /* global */
86 #define PARAM_AT_HISTORY           "at_history="       /* global */
87 #define PARAM_MGSNODE              "mgsnode="          /* only at mounttime */
88 #define PARAM_FAILNODE             "failover.node="    /* add failover nid */
89 #define PARAM_FAILMODE             "failover.mode="    /* initial mount only */
90 #define PARAM_ACTIVE               "active="           /* activate/deactivate */
91 #define PARAM_NETWORK              "network="          /* bind on nid */
92
93 /* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */
94 #define PARAM_OST                  "ost."
95 #define PARAM_OSC                  "osc."
96 #define PARAM_MDT                  "mdt."
97 #define PARAM_MDD                  "mdd."
98 #define PARAM_MDC                  "mdc."
99 #define PARAM_LLITE                "llite."
100 #define PARAM_LOV                  "lov."
101 #define PARAM_SYS                  "sys."              /* global */
102 #define PARAM_SRPC                 "srpc."
103 #define PARAM_SRPC_FLVR            "srpc.flavor."
104 #define PARAM_SRPC_UDESC           "srpc.udesc.cli2mdt"
105 #define PARAM_SEC                  "security."
106
107 /** @} param */
108
109 #endif /* _LUSTRE_PARAM_H */