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;
77 struct obd_device *obd = ld->ld_obd;
78 struct lprocfs_static_vars lvars;
82 LASSERT(name != NULL);
84 lprocfs_mdt_init_vars(&lvars);
85 rc = lprocfs_obd_setup(obd, lvars.obd_vars);
87 CERROR("Can't init lprocfs, rc %d\n", rc);
90 ptlrpc_lprocfs_register_obd(obd);
92 mdt->mdt_proc_entry = obd->obd_proc_entry;
93 LASSERT(mdt->mdt_proc_entry != NULL);
95 rc = lu_time_init(&mdt->mdt_stats, mdt->mdt_proc_entry,
96 mdt_proc_names, ARRAY_SIZE(mdt_proc_names));
98 rc = lu_time_named_init(&ld->ld_site->ls_time_stats,
99 "site_time", mdt->mdt_proc_entry,
101 ARRAY_SIZE(lu_time_names));
105 obd->obd_proc_exports_entry = proc_mkdir("exports",
106 obd->obd_proc_entry);
107 if (obd->obd_proc_exports_entry)
108 lprocfs_add_simple(obd->obd_proc_exports_entry,
109 "clear", lprocfs_nid_stats_clear_read,
110 lprocfs_nid_stats_clear_write, obd, NULL);
111 rc = lprocfs_alloc_md_stats(obd, LPROC_MDT_NR);
116 int mdt_procfs_fini(struct mdt_device *mdt)
118 struct lu_device *ld = &mdt->mdt_md_dev.md_lu_dev;
119 struct obd_device *obd = ld->ld_obd;
121 if (mdt->mdt_proc_entry) {
122 lu_time_fini(&ld->ld_site->ls_time_stats);
123 lu_time_fini(&mdt->mdt_stats);
124 mdt->mdt_proc_entry = NULL;
126 if (obd->obd_proc_exports_entry) {
127 lprocfs_remove_proc_entry("clear", obd->obd_proc_exports_entry);
128 obd->obd_proc_exports_entry = NULL;
130 ptlrpc_lprocfs_unregister_obd(obd);
131 lprocfs_free_md_stats(obd);
132 lprocfs_obd_cleanup(obd);
137 void mdt_time_start(const struct mdt_thread_info *info)
139 lu_lprocfs_time_start(info->mti_env);
142 void mdt_time_end(const struct mdt_thread_info *info, int idx)
144 lu_lprocfs_time_end(info->mti_env, info->mti_mdt->mdt_stats, idx);
147 static int lprocfs_rd_identity_expire(char *page, char **start, off_t off,
148 int count, int *eof, void *data)
150 struct obd_device *obd = data;
151 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
154 return snprintf(page, count, "%lu\n",
155 mdt->mdt_identity_cache->uc_entry_expire / HZ);
158 static int lprocfs_wr_identity_expire(struct file *file, const char *buffer,
159 unsigned long count, void *data)
161 struct obd_device *obd = data;
162 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
165 rc = lprocfs_write_helper(buffer, count, &val);
169 mdt->mdt_identity_cache->uc_entry_expire = val * HZ;
173 static int lprocfs_rd_identity_acquire_expire(char *page, char **start,
174 off_t off, int count, int *eof,
177 struct obd_device *obd = data;
178 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
181 return snprintf(page, count, "%lu\n",
182 mdt->mdt_identity_cache->uc_acquire_expire / HZ);
185 static int lprocfs_wr_identity_acquire_expire(struct file *file,
190 struct obd_device *obd = data;
191 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
194 rc = lprocfs_write_helper(buffer, count, &val);
198 mdt->mdt_identity_cache->uc_acquire_expire = val * HZ;
202 static int lprocfs_rd_identity_upcall(char *page, char **start, off_t off,
203 int count, int *eof, void *data)
205 struct obd_device *obd = data;
206 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
207 struct upcall_cache *hash = mdt->mdt_identity_cache;
211 read_lock(&hash->uc_upcall_rwlock);
212 len = snprintf(page, count, "%s\n", hash->uc_upcall);
213 read_unlock(&hash->uc_upcall_rwlock);
217 static int lprocfs_wr_identity_upcall(struct file *file, const char *buffer,
218 unsigned long count, void *data)
220 struct obd_device *obd = data;
221 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
222 struct upcall_cache *hash = mdt->mdt_identity_cache;
223 char kernbuf[UC_CACHE_UPCALL_MAXPATH] = { '\0' };
225 if (count >= UC_CACHE_UPCALL_MAXPATH) {
226 CERROR("%s: identity upcall too long\n", obd->obd_name);
230 if (copy_from_user(kernbuf, buffer, min_t(unsigned long, count,
231 UC_CACHE_UPCALL_MAXPATH - 1)))
234 /* Remove any extraneous bits from the upcall (e.g. linefeeds) */
235 write_lock(&hash->uc_upcall_rwlock);
236 sscanf(kernbuf, "%s", hash->uc_upcall);
237 write_unlock(&hash->uc_upcall_rwlock);
239 if (strcmp(hash->uc_name, obd->obd_name) != 0)
240 CWARN("%s: write to upcall name %s\n",
241 obd->obd_name, hash->uc_upcall);
243 if (strcmp(hash->uc_upcall, "NONE") == 0 && mdt->mdt_opts.mo_acl)
244 CWARN("%s: disable \"identity_upcall\" with ACL enabled maybe "
245 "cause unexpected \"EACCESS\"\n", obd->obd_name);
247 CWARN("%s: identity upcall set to %s\n", obd->obd_name, hash->uc_upcall);
251 static int lprocfs_wr_identity_flush(struct file *file, const char *buffer,
252 unsigned long count, void *data)
254 struct obd_device *obd = data;
255 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
258 rc = lprocfs_write_helper(buffer, count, &uid);
262 mdt_flush_identity(mdt->mdt_identity_cache, uid);
266 static int lprocfs_wr_identity_info(struct file *file, const char *buffer,
267 unsigned long count, void *data)
269 struct obd_device *obd = data;
270 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
271 struct identity_downcall_data sparam, *param = &sparam;
272 int size = 0, rc = 0;
274 if (count < sizeof(*param)) {
275 CERROR("%s: invalid data size %lu\n", obd->obd_name, count);
279 if (copy_from_user(&sparam, buffer, sizeof(sparam))) {
280 CERROR("%s: bad identity data\n", obd->obd_name);
281 GOTO(out, rc = -EFAULT);
284 if (sparam.idd_magic != IDENTITY_DOWNCALL_MAGIC) {
285 CERROR("%s: MDS identity downcall bad params\n", obd->obd_name);
286 GOTO(out, rc = -EINVAL);
289 if (sparam.idd_nperms > N_PERMS_MAX) {
290 CERROR("%s: perm count %d more than maximum %d\n",
291 obd->obd_name, sparam.idd_nperms, N_PERMS_MAX);
292 GOTO(out, rc = -EINVAL);
295 if (sparam.idd_ngroups > NGROUPS_MAX) {
296 CERROR("%s: group count %d more than maximum %d\n",
297 obd->obd_name, sparam.idd_ngroups, NGROUPS_MAX);
298 GOTO(out, rc = -EINVAL);
301 if (sparam.idd_ngroups) {
302 size = offsetof(struct identity_downcall_data,
303 idd_groups[sparam.idd_ngroups]);
304 OBD_ALLOC(param, size);
306 CERROR("%s: fail to alloc %d bytes for uid %u"
307 " with %d groups\n", obd->obd_name, size,
308 sparam.idd_uid, sparam.idd_ngroups);
310 param->idd_ngroups = 0;
311 } else if (copy_from_user(param, buffer, size)) {
312 CERROR("%s: uid %u bad supplementary group data\n",
313 obd->obd_name, sparam.idd_uid);
314 OBD_FREE(param, size);
316 param->idd_ngroups = 0;
320 rc = upcall_cache_downcall(mdt->mdt_identity_cache, param->idd_err,
321 param->idd_uid, param);
324 if (param && (param != &sparam))
325 OBD_FREE(param, size);
331 static int lprocfs_rd_capa(char *page, char **start, off_t off,
332 int count, int *eof, void *data)
334 struct obd_device *obd = data;
335 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
337 return snprintf(page, count, "capability on: %s %s\n",
338 mdt->mdt_opts.mo_oss_capa ? "oss" : "",
339 mdt->mdt_opts.mo_mds_capa ? "mds" : "");
342 static int lprocfs_wr_capa(struct file *file, const char *buffer,
343 unsigned long count, void *data)
345 struct obd_device *obd = data;
346 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
349 rc = lprocfs_write_helper(buffer, count, &val);
353 if (val < 0 || val > 3) {
354 CERROR("invalid capability mode, only 0/2/3 is accepted.\n"
355 " 0: disable fid capability\n"
356 " 2: enable MDS fid capability\n"
357 " 3: enable both MDS and OSS fid capability\n");
361 /* OSS fid capability needs enable both MDS and OSS fid capability on
364 CERROR("can't enable OSS fid capability only, you should use "
365 "'3' to enable both MDS and OSS fid capability.\n");
369 mdt->mdt_opts.mo_oss_capa = (val & 0x1);
370 mdt->mdt_opts.mo_mds_capa = !!(val & 0x2);
371 mdt->mdt_capa_conf = 1;
372 LCONSOLE_INFO("MDS %s %s MDS fid capability.\n",
374 mdt->mdt_opts.mo_mds_capa ? "enabled" : "disabled");
375 LCONSOLE_INFO("MDS %s %s OSS fid capability.\n",
377 mdt->mdt_opts.mo_oss_capa ? "enabled" : "disabled");
381 static int lprocfs_rd_capa_count(char *page, char **start, off_t off,
382 int count, int *eof, void *data)
384 return snprintf(page, count, "%d %d\n",
385 capa_count[CAPA_SITE_CLIENT],
386 capa_count[CAPA_SITE_SERVER]);
389 static int lprocfs_rd_site_stats(char *page, char **start, off_t off,
390 int count, int *eof, void *data)
392 struct obd_device *obd = data;
393 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
395 return lu_site_stats_print(mdt_lu_site(mdt), page, count);
398 static int lprocfs_rd_capa_timeout(char *page, char **start, off_t off,
399 int count, int *eof, void *data)
401 struct obd_device *obd = data;
402 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
404 return snprintf(page, count, "%lu\n", mdt->mdt_capa_timeout);
407 static int lprocfs_wr_capa_timeout(struct file *file, const char *buffer,
408 unsigned long count, void *data)
410 struct obd_device *obd = data;
411 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
414 rc = lprocfs_write_helper(buffer, count, &val);
418 mdt->mdt_capa_timeout = (unsigned long)val;
419 mdt->mdt_capa_conf = 1;
423 static int lprocfs_rd_ck_timeout(char *page, char **start, off_t off, int count,
424 int *eof, void *data)
426 struct obd_device *obd = data;
427 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
429 return snprintf(page, count, "%lu\n", mdt->mdt_ck_timeout);
432 static int lprocfs_wr_ck_timeout(struct file *file, const char *buffer,
433 unsigned long count, void *data)
435 struct obd_device *obd = data;
436 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
439 rc = lprocfs_write_helper(buffer, count, &val);
443 mdt->mdt_ck_timeout = (unsigned long)val;
444 mdt->mdt_capa_conf = 1;
448 static int lprocfs_mdt_wr_evict_client(struct file *file, const char *buffer,
449 unsigned long count, void *data)
451 char tmpbuf[sizeof(struct obd_uuid)];
453 sscanf(buffer, "%40s", tmpbuf);
455 if (strncmp(tmpbuf, "nid:", 4) != 0)
456 return lprocfs_wr_evict_client(file, buffer, count, data);
458 CERROR("NOT implement evict client by nid %s\n", tmpbuf);
463 static int lprocfs_rd_sec_level(char *page, char **start, off_t off,
464 int count, int *eof, void *data)
466 struct obd_device *obd = data;
467 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
469 return snprintf(page, count, "%d\n", mdt->mdt_sec_level);
472 static int lprocfs_wr_sec_level(struct file *file, const char *buffer,
473 unsigned long count, void *data)
475 struct obd_device *obd = data;
476 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
479 rc = lprocfs_write_helper(buffer, count, &val);
483 if (val > LUSTRE_SEC_ALL || val < LUSTRE_SEC_NONE)
486 if (val == LUSTRE_SEC_SPECIFY) {
487 CWARN("security level %d will be supported in future.\n",
492 mdt->mdt_sec_level = val;
496 static int lprocfs_rd_cos(char *page, char **start, off_t off,
497 int count, int *eof, void *data)
499 struct obd_device *obd = data;
500 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
502 return snprintf(page, count, "%u\n", mdt_cos_is_enabled(mdt));
505 static int lprocfs_wr_cos(struct file *file, const char *buffer,
506 unsigned long count, void *data)
508 struct obd_device *obd = data;
509 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
512 rc = lprocfs_write_helper(buffer, count, &val);
515 mdt_enable_cos(mdt, val);
519 static int lprocfs_rd_root_squash(char *page, char **start, off_t off,
520 int count, int *eof, void *data)
522 struct obd_device *obd = data;
523 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
526 return snprintf(page, count, "%u:%u\n", mdt->mdt_squash_uid,
527 mdt->mdt_squash_gid);
530 static int safe_strtoul(const char *str, char **endp, unsigned long *res)
534 *res = simple_strtoul(str, endp, 0);
538 sprintf(n, "%lu", *res);
539 if (strncmp(n, str, *endp - str))
545 static int lprocfs_wr_root_squash(struct file *file, const char *buffer,
546 unsigned long count, void *data)
548 struct obd_device *obd = data;
549 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
551 char kernbuf[50], *tmp, *end, *errmsg;
552 unsigned long uid, gid;
556 if (count >= sizeof(kernbuf)) {
557 errmsg = "string too long";
558 GOTO(failed, rc = -EINVAL);
560 if (copy_from_user(kernbuf, buffer, count)) {
561 errmsg = "bad address";
562 GOTO(failed, rc = -EFAULT);
564 kernbuf[count] = '\0';
567 if (safe_strtoul(buffer, &tmp, &uid)) {
568 uid = mdt->mdt_squash_uid;
575 if (safe_strtoul(tmp, &end, &gid)) {
576 gid = mdt->mdt_squash_gid;
580 gid = mdt->mdt_squash_gid;
584 mdt->mdt_squash_uid = uid;
585 mdt->mdt_squash_gid = gid;
587 if (nouid && nogid) {
588 errmsg = "needs uid:gid format";
589 GOTO(failed, rc = -EINVAL);
592 LCONSOLE_INFO("%s: root_squash is set to %u:%u\n",
594 mdt->mdt_squash_uid, mdt->mdt_squash_gid);
598 CWARN("%s: failed to set root_squash to \"%s\", %s: rc %d\n",
599 obd->obd_name, buffer, errmsg, rc);
603 static int lprocfs_rd_nosquash_nids(char *page, char **start, off_t off,
604 int count, int *eof, void *data)
606 struct obd_device *obd = data;
607 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
609 if (mdt->mdt_nosquash_str)
610 return snprintf(page, count, "%s\n", mdt->mdt_nosquash_str);
611 return snprintf(page, count, "NONE\n");
614 static int lprocfs_wr_nosquash_nids(struct file *file, const char *buffer,
615 unsigned long count, void *data)
617 struct obd_device *obd = data;
618 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
620 char *kernbuf, *errmsg;
621 struct list_head tmp;
624 OBD_ALLOC(kernbuf, count + 1);
625 if (kernbuf == NULL) {
626 errmsg = "no memory";
627 GOTO(failed, rc = -ENOMEM);
629 if (copy_from_user(kernbuf, buffer, count)) {
630 errmsg = "bad address";
631 GOTO(failed, rc = -EFAULT);
633 kernbuf[count] = '\0';
635 if (!strcmp(kernbuf, "NONE") || !strcmp(kernbuf, "clear")) {
636 /* empty string is special case */
637 down_write(&mdt->mdt_squash_sem);
638 if (!list_empty(&mdt->mdt_nosquash_nids)) {
639 cfs_free_nidlist(&mdt->mdt_nosquash_nids);
640 OBD_FREE(mdt->mdt_nosquash_str,
641 mdt->mdt_nosquash_strlen);
642 mdt->mdt_nosquash_str = NULL;
643 mdt->mdt_nosquash_strlen = 0;
645 up_write(&mdt->mdt_squash_sem);
646 LCONSOLE_INFO("%s: nosquash_nids is cleared\n",
648 OBD_FREE(kernbuf, count + 1);
652 CFS_INIT_LIST_HEAD(&tmp);
653 if (cfs_parse_nidlist(kernbuf, count, &tmp) <= 0) {
654 errmsg = "can't parse";
655 GOTO(failed, rc = -EINVAL);
658 down_write(&mdt->mdt_squash_sem);
659 if (!list_empty(&mdt->mdt_nosquash_nids)) {
660 cfs_free_nidlist(&mdt->mdt_nosquash_nids);
661 OBD_FREE(mdt->mdt_nosquash_str, mdt->mdt_nosquash_strlen);
663 mdt->mdt_nosquash_str = kernbuf;
664 mdt->mdt_nosquash_strlen = count + 1;
665 list_splice(&tmp, &mdt->mdt_nosquash_nids);
667 LCONSOLE_INFO("%s: nosquash_nids is set to %s\n",
668 obd->obd_name, kernbuf);
669 up_write(&mdt->mdt_squash_sem);
673 CWARN("%s: failed to set nosquash_nids to \"%s\", %s: rc %d\n",
674 obd->obd_name, kernbuf, errmsg, rc);
676 OBD_FREE(kernbuf, count + 1);
680 static int lprocfs_rd_mdt_som(char *page, char **start, off_t off,
681 int count, int *eof, void *data)
683 struct obd_device *obd = data;
684 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
686 return snprintf(page, count, "%sabled\n",
687 mdt->mdt_som_conf ? "en" : "dis");
690 #ifdef HAVE_QUOTA_SUPPORT
691 static int mdt_quota_off(struct mdt_device *mdt)
693 struct md_device *next = mdt->mdt_child;
694 const struct md_quota_operations *mqo = &next->md_ops->mdo_quota;
698 lu_env_init(&env, LCT_MD_THREAD);
699 rc = mqo->mqo_off(&env, next, UGQUOTA | IMMQUOTA);
704 static int mdt_quota_off(struct mdt_device *mdt)
710 static int lprocfs_wr_mdt_som(struct file *file, const char *buffer,
711 unsigned long count, void *data)
713 struct obd_export *exp;
714 struct obd_device *obd = data;
715 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
717 unsigned long val = 0;
720 if (count > (sizeof(kernbuf) - 1))
723 if (copy_from_user(kernbuf, buffer, count))
726 kernbuf[count] = '\0';
728 if (!strcmp(kernbuf, "enabled"))
730 else if (strcmp(kernbuf, "disabled"))
733 if (mdt->mdt_som_conf == val)
736 if (!obd->obd_process_conf) {
737 CERROR("Temporary SOM change is not supported, use lctl "
738 "conf_param for permanent setting\n");
742 /* 1 stands for self export. */
743 list_for_each_entry(exp, &obd->obd_exports, exp_obd_chain) {
744 if (exp == obd->obd_self_export)
746 if (exp->exp_connect_flags & OBD_CONNECT_MDS_MDS)
748 /* Some clients are already connected, skip the change */
749 LCONSOLE_INFO("%s is already connected, SOM will be %s on "
750 "the next mount\n", exp->exp_client_uuid.uuid,
751 val ? "enabled" : "disabled");
755 if ((rc = mdt_quota_off(mdt))) {
762 mdt->mdt_som_conf = val;
763 LCONSOLE_INFO("Enabling SOM\n");
768 /* Temporary; for testing purposes only */
769 static int lprocfs_mdt_wr_mdc(struct file *file, const char *buffer,
770 unsigned long count, void *data)
772 struct obd_device *obd = data;
773 struct obd_export *exp = NULL;
774 struct obd_uuid uuid;
775 char tmpbuf[sizeof(struct obd_uuid)];
777 sscanf(buffer, "%40s", tmpbuf);
779 obd_str2uuid(&uuid, tmpbuf);
780 exp = cfs_hash_lookup(obd->obd_uuid_hash, &uuid);
782 CERROR("%s: no export %s found\n",
783 obd->obd_name, obd_uuid2str(&uuid));
785 mdt_hsm_copytool_send(exp);
786 class_export_put(exp);
792 static struct lprocfs_vars lprocfs_mdt_obd_vars[] = {
793 { "uuid", lprocfs_rd_uuid, 0, 0 },
794 { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
795 { "num_exports", lprocfs_rd_num_exports, 0, 0 },
796 { "identity_expire", lprocfs_rd_identity_expire,
797 lprocfs_wr_identity_expire, 0 },
798 { "identity_acquire_expire", lprocfs_rd_identity_acquire_expire,
799 lprocfs_wr_identity_acquire_expire, 0 },
800 { "identity_upcall", lprocfs_rd_identity_upcall,
801 lprocfs_wr_identity_upcall, 0 },
802 { "identity_flush", 0, lprocfs_wr_identity_flush, 0 },
803 { "identity_info", 0, lprocfs_wr_identity_info, 0 },
804 { "capa", lprocfs_rd_capa,
805 lprocfs_wr_capa, 0 },
806 { "capa_timeout", lprocfs_rd_capa_timeout,
807 lprocfs_wr_capa_timeout, 0 },
808 { "capa_key_timeout", lprocfs_rd_ck_timeout,
809 lprocfs_wr_ck_timeout, 0 },
810 { "capa_count", lprocfs_rd_capa_count, 0, 0 },
811 { "site_stats", lprocfs_rd_site_stats, 0, 0 },
812 { "evict_client", 0, lprocfs_mdt_wr_evict_client, 0 },
813 { "hash_stats", lprocfs_obd_rd_hash, 0, 0 },
814 { "sec_level", lprocfs_rd_sec_level,
815 lprocfs_wr_sec_level, 0 },
816 { "commit_on_sharing", lprocfs_rd_cos, lprocfs_wr_cos, 0 },
817 { "root_squash", lprocfs_rd_root_squash,
818 lprocfs_wr_root_squash, 0 },
819 { "nosquash_nids", lprocfs_rd_nosquash_nids,
820 lprocfs_wr_nosquash_nids, 0 },
821 { "som", lprocfs_rd_mdt_som,
822 lprocfs_wr_mdt_som, 0 },
823 { "mdccomm", 0, lprocfs_mdt_wr_mdc, 0 },
827 static struct lprocfs_vars lprocfs_mdt_module_vars[] = {
828 { "num_refs", lprocfs_rd_numrefs, 0, 0 },
832 void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars)
834 lvars->module_vars = lprocfs_mdt_module_vars;
835 lvars->obd_vars = lprocfs_mdt_obd_vars;