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.sun.com/software/products/lustre/docs/GPLv2.pdf 19 * 20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 21 * CA 95054 USA or visit www.sun.com if you need additional information or 22 * have any questions. 23 * 24 * GPL HEADER END 25 */ 26 /* 27 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 28 * Use is subject to license terms. 29 * 30 * Copyright (c) 2011, 2012, Intel Corporation. 31 */ 32 /* 33 * This file is part of Lustre, http://www.lustre.org/ 34 * Lustre is a trademark of Sun Microsystems, Inc. 35 * 36 * lustre/include/lustre_param.h 37 * 38 * User-settable parameter keys 39 * 40 * Author: Nathan Rutman <nathan@clusterfs.com> 41 */ 42 43 #ifndef _LUSTRE_PARAM_H 44 #define _LUSTRE_PARAM_H 45 46 /** \defgroup param param 47 * 48 * @{ 49 */ 50 51 /* For interoperability */ 52 struct cfg_interop_param { 53 char *old_param; 54 char *new_param; 55 }; 56 57 /* obd_config.c */ 58 int class_find_param(char *buf, char *key, char **valp); 59 struct cfg_interop_param *class_find_old_param(const char *param, 60 struct cfg_interop_param *ptr); 61 int class_get_next_param(char **params, char *copy); 62 int class_match_param(char *buf, char *key, char **valp); 63 int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh); 64 int class_parse_nid_quiet(char *buf, lnet_nid_t *nid, char **endh); 65 int class_parse_net(char *buf, __u32 *net, char **endh); 66 int class_match_nid(char *buf, char *key, lnet_nid_t nid); 67 int class_match_net(char *buf, char *key, __u32 net); 68 /* obd_mount.c */ 69 int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd, 70 char *s1, char *s2, char *s3, char *s4); 71 72 73 74 /****************** User-settable parameter keys *********************/ 75 /* e.g. 76 tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda 77 lctl conf_param testfs-OST0000 failover.node=3@elan,192.168.0.3@tcp0 78 ... testfs-MDT0000.lov.stripesize=4M 79 ... testfs-OST0000.ost.client_cache_seconds=15 80 ... testfs.sys.timeout=<secs> 81 ... testfs.llite.max_read_ahead_mb=16 82 */ 83 84 /* System global or special params not handled in obd's proc 85 * See mgs_write_log_sys() 86 */ 87 #define PARAM_TIMEOUT "timeout=" /* global */ 88 #define PARAM_LDLM_TIMEOUT "ldlm_timeout=" /* global */ 89 #define PARAM_AT_MIN "at_min=" /* global */ 90 #define PARAM_AT_MAX "at_max=" /* global */ 91 #define PARAM_AT_EXTRA "at_extra=" /* global */ 92 #define PARAM_AT_EARLY_MARGIN "at_early_margin=" /* global */ 93 #define PARAM_AT_HISTORY "at_history=" /* global */ 94 #define PARAM_JOBID_VAR "jobid_var=" /* global */ 95 #define PARAM_MGSNODE "mgsnode=" /* only at mounttime */ 96 #define PARAM_FAILNODE "failover.node=" /* add failover nid */ 97 #define PARAM_FAILMODE "failover.mode=" /* initial mount only */ 98 #define PARAM_ACTIVE "active=" /* activate/deactivate */ 99 #define PARAM_NETWORK "network=" /* bind on nid */ 100 #define PARAM_ID_UPCALL "identity_upcall=" /* identity upcall */ 101 102 /* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */ 103 #define PARAM_OST "ost." 104 #define PARAM_OSC "osc." 105 #define PARAM_MDT "mdt." 106 #define PARAM_MDD "mdd." 107 #define PARAM_MDC "mdc." 108 #define PARAM_LLITE "llite." 109 #define PARAM_LOV "lov." 110 #define PARAM_LOD "lod." 111 #define PARAM_OSP "osp." 112 #define PARAM_SYS "sys." /* global */ 113 #define PARAM_SRPC "srpc." 114 #define PARAM_SRPC_FLVR "srpc.flavor." 115 #define PARAM_SRPC_UDESC "srpc.udesc.cli2mdt" 116 #define PARAM_SEC "security." 117 #define PARAM_QUOTA "quota." /* global */ 118 119 /** @} param */ 120 121 #endif /* _LUSTRE_PARAM_H */ 122