1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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.
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).
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
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
29 * Copyright 2008 Sun Microsystems, Inc. All rights reserved
30 * Use is subject to license terms.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
36 * lustre/mdt/mdt_lproc.c
38 * Author: Lai Siyao <lsy@clusterfs.com>
39 * Author: Fan Yong <fanyong@clusterfs.com>
43 # define EXPORT_SYMTAB
45 #define DEBUG_SUBSYSTEM S_MDS
47 #include <linux/version.h>
48 #include <asm/statfs.h>
50 #include <linux/module.h>
52 /* LUSTRE_VERSION_CODE */
53 #include <lustre_ver.h>
55 * struct OBD_{ALLOC,FREE}*()
58 #include <obd_support.h>
59 /* struct obd_export */
60 #include <lustre_export.h>
61 /* struct obd_device */
63 #include <obd_class.h>
64 #include <lustre_mds.h>
65 #include <lustre_mdt.h>
66 #include <lprocfs_status.h>
68 #include "mdt_internal.h"
69 #include <lnet/lib-lnet.h>
71 static const char *mdt_proc_names[LPROC_MDT_NR] = {
74 int mdt_procfs_init(struct mdt_device *mdt, const char *name)
76 struct lu_device *ld = &mdt->mdt_md_dev.md_lu_dev;
80 LASSERT(name != NULL);
81 mdt->mdt_proc_entry = ld->ld_obd->obd_proc_entry;
82 LASSERT(mdt->mdt_proc_entry != NULL);
84 result = lu_time_init(&mdt->mdt_stats, mdt->mdt_proc_entry,
85 mdt_proc_names, ARRAY_SIZE(mdt_proc_names));
87 result = lu_time_named_init(&ld->ld_site->ls_time_stats,
88 "site_time", mdt->mdt_proc_entry,
90 ARRAY_SIZE(lu_time_names));
94 int mdt_procfs_fini(struct mdt_device *mdt)
96 struct lu_device *ld = &mdt->mdt_md_dev.md_lu_dev;
97 if (mdt->mdt_proc_entry) {
98 lu_time_fini(&ld->ld_site->ls_time_stats);
99 lu_time_fini(&mdt->mdt_stats);
100 mdt->mdt_proc_entry = NULL;
105 void mdt_time_start(const struct mdt_thread_info *info)
107 lu_lprocfs_time_start(info->mti_env);
110 void mdt_time_end(const struct mdt_thread_info *info, int idx)
112 lu_lprocfs_time_end(info->mti_env, info->mti_mdt->mdt_stats, idx);
115 static int lprocfs_rd_identity_expire(char *page, char **start, off_t off,
116 int count, int *eof, void *data)
118 struct obd_device *obd = data;
119 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
122 return snprintf(page, count, "%lu\n",
123 mdt->mdt_identity_cache->uc_entry_expire / HZ);
126 static int lprocfs_wr_identity_expire(struct file *file, const char *buffer,
127 unsigned long count, void *data)
129 struct obd_device *obd = data;
130 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
133 rc = lprocfs_write_helper(buffer, count, &val);
137 mdt->mdt_identity_cache->uc_entry_expire = val * HZ;
141 static int lprocfs_rd_identity_acquire_expire(char *page, char **start,
142 off_t off, int count, int *eof,
145 struct obd_device *obd = data;
146 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
149 return snprintf(page, count, "%lu\n",
150 mdt->mdt_identity_cache->uc_acquire_expire / HZ);
153 static int lprocfs_wr_identity_acquire_expire(struct file *file,
158 struct obd_device *obd = data;
159 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
162 rc = lprocfs_write_helper(buffer, count, &val);
166 mdt->mdt_identity_cache->uc_acquire_expire = val * HZ;
170 static int lprocfs_rd_identity_upcall(char *page, char **start, off_t off,
171 int count, int *eof, void *data)
173 struct obd_device *obd = data;
174 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
175 struct upcall_cache *hash = mdt->mdt_identity_cache;
179 read_lock(&hash->uc_upcall_rwlock);
180 len = snprintf(page, count, "%s\n", hash->uc_upcall);
181 read_unlock(&hash->uc_upcall_rwlock);
185 static int lprocfs_wr_identity_upcall(struct file *file, const char *buffer,
186 unsigned long count, void *data)
188 struct obd_device *obd = data;
189 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
190 struct upcall_cache *hash = mdt->mdt_identity_cache;
191 char kernbuf[UC_CACHE_UPCALL_MAXPATH] = { '\0' };
193 if (count >= UC_CACHE_UPCALL_MAXPATH) {
194 CERROR("%s: identity upcall too long\n", obd->obd_name);
198 if (copy_from_user(kernbuf, buffer, min_t(unsigned long, count,
199 UC_CACHE_UPCALL_MAXPATH - 1)))
202 /* Remove any extraneous bits from the upcall (e.g. linefeeds) */
203 write_lock(&hash->uc_upcall_rwlock);
204 sscanf(kernbuf, "%s", hash->uc_upcall);
205 write_unlock(&hash->uc_upcall_rwlock);
207 if (strcmp(hash->uc_name, obd->obd_name) != 0)
208 CWARN("%s: write to upcall name %s\n",
209 obd->obd_name, hash->uc_upcall);
211 if (strcmp(hash->uc_upcall, "NONE") == 0 && mdt->mdt_opts.mo_acl)
212 CWARN("%s: disable \"identity_upcall\" with ACL enabled maybe "
213 "cause unexpected \"EACCESS\"\n", obd->obd_name);
215 CWARN("%s: identity upcall set to %s\n", obd->obd_name, hash->uc_upcall);
219 static int lprocfs_wr_identity_flush(struct file *file, const char *buffer,
220 unsigned long count, void *data)
222 struct obd_device *obd = data;
223 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
226 rc = lprocfs_write_helper(buffer, count, &uid);
230 mdt_flush_identity(mdt->mdt_identity_cache, uid);
234 static int lprocfs_wr_identity_info(struct file *file, const char *buffer,
235 unsigned long count, void *data)
237 struct obd_device *obd = data;
238 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
239 struct identity_downcall_data sparam, *param = &sparam;
240 int size = 0, rc = 0;
242 if (count < sizeof(*param)) {
243 CERROR("%s: invalid data size %lu\n", obd->obd_name, count);
247 if (copy_from_user(&sparam, buffer, sizeof(sparam))) {
248 CERROR("%s: bad identity data\n", obd->obd_name);
249 GOTO(out, rc = -EFAULT);
252 if (sparam.idd_magic != IDENTITY_DOWNCALL_MAGIC) {
253 CERROR("%s: MDS identity downcall bad params\n", obd->obd_name);
254 GOTO(out, rc = -EINVAL);
257 if (sparam.idd_nperms > N_PERMS_MAX) {
258 CERROR("%s: perm count %d more than maximum %d\n",
259 obd->obd_name, sparam.idd_nperms, N_PERMS_MAX);
260 GOTO(out, rc = -EINVAL);
263 if (sparam.idd_ngroups > NGROUPS_MAX) {
264 CERROR("%s: group count %d more than maximum %d\n",
265 obd->obd_name, sparam.idd_ngroups, NGROUPS_MAX);
266 GOTO(out, rc = -EINVAL);
269 if (sparam.idd_ngroups) {
270 size = offsetof(struct identity_downcall_data,
271 idd_groups[sparam.idd_ngroups]);
272 OBD_ALLOC(param, size);
274 CERROR("%s: fail to alloc %d bytes for uid %u"
275 " with %d groups\n", obd->obd_name, size,
276 sparam.idd_uid, sparam.idd_ngroups);
278 param->idd_ngroups = 0;
279 } else if (copy_from_user(param, buffer, size)) {
280 CERROR("%s: uid %u bad supplementary group data\n",
281 obd->obd_name, sparam.idd_uid);
282 OBD_FREE(param, size);
284 param->idd_ngroups = 0;
288 rc = upcall_cache_downcall(mdt->mdt_identity_cache, param->idd_err,
289 param->idd_uid, param);
292 if (param && (param != &sparam))
293 OBD_FREE(param, size);
299 static int lprocfs_rd_capa(char *page, char **start, off_t off,
300 int count, int *eof, void *data)
302 struct obd_device *obd = data;
303 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
305 return snprintf(page, count, "capability on: %s %s\n",
306 mdt->mdt_opts.mo_oss_capa ? "oss" : "",
307 mdt->mdt_opts.mo_mds_capa ? "mds" : "");
310 static int lprocfs_wr_capa(struct file *file, const char *buffer,
311 unsigned long count, void *data)
313 struct obd_device *obd = data;
314 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
317 rc = lprocfs_write_helper(buffer, count, &val);
321 if (val < 0 || val > 3) {
322 CERROR("invalid capability mode, only 0/2/3 is accepted.\n"
323 " 0: disable fid capability\n"
324 " 2: enable MDS fid capability\n"
325 " 3: enable both MDS and OSS fid capability\n");
329 /* OSS fid capability needs enable both MDS and OSS fid capability on
332 CERROR("can't enable OSS fid capability only, you should use "
333 "'3' to enable both MDS and OSS fid capability.\n");
337 mdt->mdt_opts.mo_oss_capa = (val & 0x1);
338 mdt->mdt_opts.mo_mds_capa = !!(val & 0x2);
339 mdt->mdt_capa_conf = 1;
340 LCONSOLE_INFO("MDS %s %s MDS fid capability.\n",
342 mdt->mdt_opts.mo_mds_capa ? "enabled" : "disabled");
343 LCONSOLE_INFO("MDS %s %s OSS fid capability.\n",
345 mdt->mdt_opts.mo_oss_capa ? "enabled" : "disabled");
349 static int lprocfs_rd_capa_count(char *page, char **start, off_t off,
350 int count, int *eof, void *data)
352 return snprintf(page, count, "%d %d\n",
353 capa_count[CAPA_SITE_CLIENT],
354 capa_count[CAPA_SITE_SERVER]);
357 static int lprocfs_rd_site_stats(char *page, char **start, off_t off,
358 int count, int *eof, void *data)
360 struct obd_device *obd = data;
361 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
363 return lu_site_stats_print(mdt_lu_site(mdt), page, count);
366 static int lprocfs_rd_capa_timeout(char *page, char **start, off_t off,
367 int count, int *eof, void *data)
369 struct obd_device *obd = data;
370 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
372 return snprintf(page, count, "%lu\n", mdt->mdt_capa_timeout);
375 static int lprocfs_wr_capa_timeout(struct file *file, const char *buffer,
376 unsigned long count, void *data)
378 struct obd_device *obd = data;
379 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
382 rc = lprocfs_write_helper(buffer, count, &val);
386 mdt->mdt_capa_timeout = (unsigned long)val;
387 mdt->mdt_capa_conf = 1;
391 static int lprocfs_rd_ck_timeout(char *page, char **start, off_t off, int count,
392 int *eof, void *data)
394 struct obd_device *obd = data;
395 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
397 return snprintf(page, count, "%lu\n", mdt->mdt_ck_timeout);
400 static int lprocfs_wr_ck_timeout(struct file *file, const char *buffer,
401 unsigned long count, void *data)
403 struct obd_device *obd = data;
404 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
407 rc = lprocfs_write_helper(buffer, count, &val);
411 mdt->mdt_ck_timeout = (unsigned long)val;
412 mdt->mdt_capa_conf = 1;
416 static int lprocfs_mdt_wr_evict_client(struct file *file, const char *buffer,
417 unsigned long count, void *data)
419 char tmpbuf[sizeof(struct obd_uuid)];
421 sscanf(buffer, "%40s", tmpbuf);
423 if (strncmp(tmpbuf, "nid:", 4) != 0)
424 return lprocfs_wr_evict_client(file, buffer, count, data);
426 CERROR("NOT implement evict client by nid %s\n", tmpbuf);
431 static int lprocfs_rd_sec_level(char *page, char **start, off_t off,
432 int count, int *eof, void *data)
434 struct obd_device *obd = data;
435 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
437 return snprintf(page, count, "%d\n", mdt->mdt_sec_level);
440 static int lprocfs_wr_sec_level(struct file *file, const char *buffer,
441 unsigned long count, void *data)
443 struct obd_device *obd = data;
444 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
447 rc = lprocfs_write_helper(buffer, count, &val);
451 if (val > LUSTRE_SEC_ALL || val < LUSTRE_SEC_NONE)
454 if (val == LUSTRE_SEC_SPECIFY) {
455 CWARN("security level %d will be supported in future.\n",
460 mdt->mdt_sec_level = val;
464 static int lprocfs_rd_cos(char *page, char **start, off_t off,
465 int count, int *eof, void *data)
467 struct obd_device *obd = data;
468 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
470 return snprintf(page, count, "%u\n", mdt_cos_is_enabled(mdt));
473 static int lprocfs_wr_cos(struct file *file, const char *buffer,
474 unsigned long count, void *data)
476 struct obd_device *obd = data;
477 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
480 rc = lprocfs_write_helper(buffer, count, &val);
483 mdt_enable_cos(mdt, val);
487 static int lprocfs_rd_root_squash(char *page, char **start, off_t off,
488 int count, int *eof, void *data)
490 struct obd_device *obd = data;
491 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
494 return snprintf(page, count, "%u:%u\n", mdt->mdt_squash_uid,
495 mdt->mdt_squash_gid);
498 static int safe_strtoul(const char *str, char **endp, unsigned long *res)
502 *res = simple_strtoul(str, endp, 0);
506 sprintf(n, "%lu", *res);
507 if (strncmp(n, str, *endp - str))
513 static int lprocfs_wr_root_squash(struct file *file, const char *buffer,
514 unsigned long count, void *data)
516 struct obd_device *obd = data;
517 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
519 char kernbuf[50], *tmp, *end, *errmsg;
520 unsigned long uid, gid;
524 if (count >= sizeof(kernbuf)) {
525 errmsg = "string too long";
526 GOTO(failed, rc = -EINVAL);
528 if (copy_from_user(kernbuf, buffer, count)) {
529 errmsg = "bad address";
530 GOTO(failed, rc = -EFAULT);
532 kernbuf[count] = '\0';
535 if (safe_strtoul(buffer, &tmp, &uid)) {
536 uid = mdt->mdt_squash_uid;
543 if (safe_strtoul(tmp, &end, &gid)) {
544 gid = mdt->mdt_squash_gid;
548 gid = mdt->mdt_squash_gid;
552 mdt->mdt_squash_uid = uid;
553 mdt->mdt_squash_gid = gid;
555 if (nouid && nogid) {
556 errmsg = "needs uid:gid format";
557 GOTO(failed, rc = -EINVAL);
560 LCONSOLE_INFO("%s: root_squash is set to %u:%u\n",
562 mdt->mdt_squash_uid, mdt->mdt_squash_gid);
566 CWARN("%s: failed to set root_squash to \"%s\", %s: rc %d\n",
567 obd->obd_name, buffer, errmsg, rc);
571 static int lprocfs_rd_nosquash_nids(char *page, char **start, off_t off,
572 int count, int *eof, void *data)
574 struct obd_device *obd = data;
575 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
577 if (mdt->mdt_nosquash_str)
578 return snprintf(page, count, "%s\n", mdt->mdt_nosquash_str);
579 return snprintf(page, count, "NONE\n");
582 static int lprocfs_wr_nosquash_nids(struct file *file, const char *buffer,
583 unsigned long count, void *data)
585 struct obd_device *obd = data;
586 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
588 char *kernbuf, *errmsg;
589 struct list_head tmp;
592 OBD_ALLOC(kernbuf, count + 1);
593 if (kernbuf == NULL) {
594 errmsg = "no memory";
595 GOTO(failed, rc = -ENOMEM);
597 if (copy_from_user(kernbuf, buffer, count)) {
598 errmsg = "bad address";
599 GOTO(failed, rc = -EFAULT);
601 kernbuf[count] = '\0';
603 if (!strcmp(kernbuf, "NONE") || !strcmp(kernbuf, "clear")) {
604 /* empty string is special case */
605 down_write(&mdt->mdt_squash_sem);
606 if (!list_empty(&mdt->mdt_nosquash_nids)) {
607 cfs_free_nidlist(&mdt->mdt_nosquash_nids);
608 OBD_FREE(mdt->mdt_nosquash_str,
609 mdt->mdt_nosquash_strlen);
610 mdt->mdt_nosquash_str = NULL;
611 mdt->mdt_nosquash_strlen = 0;
613 up_write(&mdt->mdt_squash_sem);
614 LCONSOLE_INFO("%s: nosquash_nids is cleared\n",
616 OBD_FREE(kernbuf, count + 1);
620 CFS_INIT_LIST_HEAD(&tmp);
621 if (cfs_parse_nidlist(kernbuf, count, &tmp) <= 0) {
622 errmsg = "can't parse";
623 GOTO(failed, rc = -EINVAL);
626 down_write(&mdt->mdt_squash_sem);
627 if (!list_empty(&mdt->mdt_nosquash_nids)) {
628 cfs_free_nidlist(&mdt->mdt_nosquash_nids);
629 OBD_FREE(mdt->mdt_nosquash_str, mdt->mdt_nosquash_strlen);
631 mdt->mdt_nosquash_str = kernbuf;
632 mdt->mdt_nosquash_strlen = count + 1;
633 list_splice(&tmp, &mdt->mdt_nosquash_nids);
635 LCONSOLE_INFO("%s: nosquash_nids is set to %s\n",
636 obd->obd_name, kernbuf);
637 up_write(&mdt->mdt_squash_sem);
641 CWARN("%s: failed to set nosquash_nids to \"%s\", %s: rc %d\n",
642 obd->obd_name, kernbuf, errmsg, rc);
644 OBD_FREE(kernbuf, count + 1);
648 static int lprocfs_rd_mdt_som(char *page, char **start, off_t off,
649 int count, int *eof, void *data)
651 struct obd_device *obd = data;
652 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
654 return snprintf(page, count, "%sabled\n",
655 mdt->mdt_som_conf ? "en" : "dis");
658 static int mdt_quota_off(struct mdt_device *mdt)
660 struct md_device *next = mdt->mdt_child;
661 const struct md_quota_operations *mqo = &next->md_ops->mdo_quota;
665 lu_env_init(&env, LCT_MD_THREAD);
666 rc = mqo->mqo_off(&env, next, UGQUOTA | IMMQUOTA);
671 static int lprocfs_wr_mdt_som(struct file *file, const char *buffer,
672 unsigned long count, void *data)
674 struct obd_export *exp;
675 struct obd_device *obd = data;
676 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
678 unsigned long val = 0;
681 if (count > (sizeof(kernbuf) - 1))
684 if (copy_from_user(kernbuf, buffer, count))
687 kernbuf[count] = '\0';
689 if (!strcmp(kernbuf, "enabled"))
691 else if (strcmp(kernbuf, "disabled"))
694 if (mdt->mdt_som_conf == val)
697 if (!obd->obd_process_conf) {
698 CERROR("Temporary SOM change is not supported, use lctl "
699 "conf_param for permanent setting\n");
703 /* 1 stands for self export. */
704 list_for_each_entry(exp, &obd->obd_exports, exp_obd_chain) {
705 if (exp == obd->obd_self_export)
707 if (exp->exp_connect_flags & OBD_CONNECT_MDS_MDS)
709 /* Some clients are already connected, skip the change */
710 LCONSOLE_INFO("%s is already connected, SOM will be %s on "
711 "the next mount\n", exp->exp_client_uuid.uuid,
712 val ? "enabled" : "disabled");
716 if ((rc = mdt_quota_off(mdt)))
719 mdt->mdt_som_conf = val;
720 LCONSOLE_INFO("Enabling SOM\n");
725 static struct lprocfs_vars lprocfs_mdt_obd_vars[] = {
726 { "uuid", lprocfs_rd_uuid, 0, 0 },
727 { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
728 { "num_exports", lprocfs_rd_num_exports, 0, 0 },
729 { "identity_expire", lprocfs_rd_identity_expire,
730 lprocfs_wr_identity_expire, 0 },
731 { "identity_acquire_expire", lprocfs_rd_identity_acquire_expire,
732 lprocfs_wr_identity_acquire_expire, 0 },
733 { "identity_upcall", lprocfs_rd_identity_upcall,
734 lprocfs_wr_identity_upcall, 0 },
735 { "identity_flush", 0, lprocfs_wr_identity_flush, 0 },
736 { "identity_info", 0, lprocfs_wr_identity_info, 0 },
737 { "capa", lprocfs_rd_capa,
738 lprocfs_wr_capa, 0 },
739 { "capa_timeout", lprocfs_rd_capa_timeout,
740 lprocfs_wr_capa_timeout, 0 },
741 { "capa_key_timeout", lprocfs_rd_ck_timeout,
742 lprocfs_wr_ck_timeout, 0 },
743 { "capa_count", lprocfs_rd_capa_count, 0, 0 },
744 { "site_stats", lprocfs_rd_site_stats, 0, 0 },
745 { "evict_client", 0, lprocfs_mdt_wr_evict_client, 0 },
746 { "hash_stats", lprocfs_obd_rd_hash, 0, 0 },
747 { "sec_level", lprocfs_rd_sec_level,
748 lprocfs_wr_sec_level, 0 },
749 { "commit_on_sharing", lprocfs_rd_cos, lprocfs_wr_cos, 0 },
750 { "root_squash", lprocfs_rd_root_squash,
751 lprocfs_wr_root_squash, 0 },
752 { "nosquash_nids", lprocfs_rd_nosquash_nids,
753 lprocfs_wr_nosquash_nids, 0 },
754 { "som", lprocfs_rd_mdt_som,
755 lprocfs_wr_mdt_som, 0 },
759 static struct lprocfs_vars lprocfs_mdt_module_vars[] = {
760 { "num_refs", lprocfs_rd_numrefs, 0, 0 },
764 void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars)
766 lvars->module_vars = lprocfs_mdt_module_vars;
767 lvars->obd_vars = lprocfs_mdt_obd_vars;