1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2004-2006 Cluster File Systems, Inc.
5 * Author: Lai Siyao <lsy@clusterfs.com>
6 * Author: Fan Yong <fanyong@clusterfs.com>
8 * This file is part of the Lustre file system, http://www.lustre.org
9 * Lustre is a trademark of Cluster File Systems, Inc.
11 * You may have signed or agreed to another license before downloading
12 * this software. If so, you are bound by the terms and conditions
13 * of that agreement, and the following does not apply to you. See the
14 * LICENSE file included with this distribution for more information.
16 * If you did not agree to a different license, then this copy of Lustre
17 * is open source software; you can redistribute it and/or modify it
18 * under the terms of version 2 of the GNU General Public License as
19 * published by the Free Software Foundation.
21 * In either case, Lustre is distributed in the hope that it will be
22 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
23 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * license text for more details.
29 # define EXPORT_SYMTAB
31 #define DEBUG_SUBSYSTEM S_MDS
33 #include <linux/version.h>
34 #include <asm/statfs.h>
36 #include <linux/module.h>
38 /* LUSTRE_VERSION_CODE */
39 #include <lustre_ver.h>
41 * struct OBD_{ALLOC,FREE}*()
44 #include <obd_support.h>
45 /* struct obd_export */
46 #include <lustre_export.h>
47 /* struct obd_device */
49 #include <obd_class.h>
50 #include <lustre_mds.h>
51 #include <lustre_mdt.h>
52 #include <lprocfs_status.h>
54 #include "mdt_internal.h"
56 static const char *mdt_proc_names[LPROC_MDT_NR] = {
59 int mdt_procfs_init(struct mdt_device *mdt, const char *name)
61 struct lu_device *ld = &mdt->mdt_md_dev.md_lu_dev;
65 LASSERT(name != NULL);
66 mdt->mdt_proc_entry = ld->ld_obd->obd_proc_entry;
67 LASSERT(mdt->mdt_proc_entry != NULL);
69 result = lu_time_init(&mdt->mdt_stats, mdt->mdt_proc_entry,
70 mdt_proc_names, ARRAY_SIZE(mdt_proc_names));
72 result = lu_time_named_init(&ld->ld_site->ls_time_stats,
73 "site_time", mdt->mdt_proc_entry,
75 ARRAY_SIZE(lu_time_names));
79 int mdt_procfs_fini(struct mdt_device *mdt)
81 struct lu_device *ld = &mdt->mdt_md_dev.md_lu_dev;
82 lu_time_fini(&ld->ld_site->ls_time_stats);
83 lu_time_fini(&mdt->mdt_stats);
84 mdt->mdt_proc_entry = NULL;
88 void mdt_time_start(const struct mdt_thread_info *info)
90 lu_lprocfs_time_start(info->mti_env);
93 void mdt_time_end(const struct mdt_thread_info *info, int idx)
95 lu_lprocfs_time_end(info->mti_env, info->mti_mdt->mdt_stats, idx);
98 static int lprocfs_rd_identity_expire(char *page, char **start, off_t off,
99 int count, int *eof, void *data)
101 struct obd_device *obd = data;
102 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
105 return snprintf(page, count, "%lu\n",
106 mdt->mdt_identity_cache->uc_entry_expire / HZ);
109 static int lprocfs_wr_identity_expire(struct file *file, const char *buffer,
110 unsigned long count, void *data)
112 struct obd_device *obd = data;
113 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
116 rc = lprocfs_write_helper(buffer, count, &val);
120 mdt->mdt_identity_cache->uc_entry_expire = val * HZ;
124 static int lprocfs_rd_identity_acquire_expire(char *page, char **start,
125 off_t off, int count, int *eof,
128 struct obd_device *obd = data;
129 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
132 return snprintf(page, count, "%lu\n",
133 mdt->mdt_identity_cache->uc_acquire_expire / HZ);
136 static int lprocfs_wr_identity_acquire_expire(struct file *file,
141 struct obd_device *obd = data;
142 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
145 rc = lprocfs_write_helper(buffer, count, &val);
149 mdt->mdt_identity_cache->uc_acquire_expire = val * HZ;
153 static int lprocfs_rd_identity_upcall(char *page, char **start, off_t off,
154 int count, int *eof, void *data)
156 struct obd_device *obd = data;
157 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
160 return snprintf(page, count, "%s\n",
161 mdt->mdt_identity_cache->uc_upcall);
164 static int lprocfs_wr_identity_upcall(struct file *file, const char *buffer,
165 unsigned long count, void *data)
167 struct obd_device *obd = data;
168 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
169 struct upcall_cache *hash = mdt->mdt_identity_cache;
170 char kernbuf[UC_CACHE_UPCALL_MAXPATH] = { '\0' };
172 if (count >= UC_CACHE_UPCALL_MAXPATH) {
173 CERROR("%s: identity upcall too long\n", obd->obd_name);
177 if (copy_from_user(kernbuf, buffer,
178 min(count, UC_CACHE_UPCALL_MAXPATH - 1)))
181 /* Remove any extraneous bits from the upcall (e.g. linefeeds) */
182 sscanf(kernbuf, "%s", hash->uc_upcall);
184 if (strcmp(hash->uc_name, obd->obd_name) != 0)
185 CWARN("%s: write to upcall name %s\n",
186 obd->obd_name, hash->uc_upcall);
187 CWARN("%s: identity upcall set to %s\n", obd->obd_name, hash->uc_upcall);
192 static int lprocfs_wr_identity_flush(struct file *file, const char *buffer,
193 unsigned long count, void *data)
195 struct obd_device *obd = data;
196 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
199 rc = lprocfs_write_helper(buffer, count, &uid);
203 mdt_flush_identity(mdt->mdt_identity_cache, uid);
207 static int lprocfs_wr_identity_info(struct file *file, const char *buffer,
208 unsigned long count, void *data)
210 struct obd_device *obd = data;
211 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
212 struct identity_downcall_data sparam, *param = &sparam;
213 int size = 0, rc = 0;
215 if (count < sizeof(*param)) {
216 CERROR("%s: invalid data size %lu\n", obd->obd_name, count);
220 if (copy_from_user(&sparam, buffer, sizeof(sparam))) {
221 CERROR("%s: bad identity data\n", obd->obd_name);
222 GOTO(out, rc = -EFAULT);
225 if (sparam.idd_magic != IDENTITY_DOWNCALL_MAGIC) {
226 CERROR("%s: MDS identity downcall bad params\n", obd->obd_name);
227 GOTO(out, rc = -EINVAL);
230 if (sparam.idd_nperms > N_SETXID_PERMS_MAX) {
231 CERROR("%s: perm count %d more than maximum %d\n",
232 obd->obd_name, sparam.idd_nperms, N_SETXID_PERMS_MAX);
233 GOTO(out, rc = -EINVAL);
236 if (sparam.idd_ngroups > NGROUPS_MAX) {
237 CERROR("%s: group count %d more than maximum %d\n",
238 obd->obd_name, sparam.idd_ngroups, NGROUPS_MAX);
239 GOTO(out, rc = -EINVAL);
242 if (sparam.idd_ngroups) {
243 size = offsetof(struct identity_downcall_data,
244 idd_groups[sparam.idd_ngroups]);
245 OBD_ALLOC(param, size);
247 CERROR("%s: fail to alloc %d bytes for uid %u"
248 " with %d groups\n", obd->obd_name, size,
249 sparam.idd_uid, sparam.idd_ngroups);
251 param->idd_ngroups = 0;
252 } else if (copy_from_user(param, buffer, size)) {
253 CERROR("%s: uid %u bad supplementary group data\n",
254 obd->obd_name, sparam.idd_uid);
255 OBD_FREE(param, size);
257 param->idd_ngroups = 0;
261 rc = upcall_cache_downcall(mdt->mdt_identity_cache, param->idd_err,
262 param->idd_uid, param);
265 if (param && (param != &sparam))
266 OBD_FREE(param, size);
271 static int lprocfs_rd_rmtacl_expire(char *page, char **start, off_t off,
272 int count, int *eof, void *data)
274 struct obd_device *obd = data;
275 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
278 return snprintf(page, count, "%lu\n",
279 mdt->mdt_rmtacl_cache->uc_entry_expire / HZ);
282 static int lprocfs_wr_rmtacl_expire(struct file *file, const char *buffer,
283 unsigned long count, void *data)
285 struct obd_device *obd = data;
286 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
289 rc = lprocfs_write_helper(buffer, count, &val);
293 mdt->mdt_rmtacl_cache->uc_entry_expire = val * HZ;
297 static int lprocfs_rd_rmtacl_acquire_expire(char *page, char **start,
298 off_t off, int count, int *eof,
301 struct obd_device *obd = data;
302 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
305 return snprintf(page, count, "%lu\n",
306 mdt->mdt_rmtacl_cache->uc_acquire_expire / HZ);
309 static int lprocfs_wr_rmtacl_acquire_expire(struct file *file,
314 struct obd_device *obd = data;
315 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
318 rc = lprocfs_write_helper(buffer, count, &val);
322 mdt->mdt_rmtacl_cache->uc_acquire_expire = val * HZ;
326 static int lprocfs_rd_rmtacl_upcall(char *page, char **start, off_t off,
327 int count, int *eof, void *data)
329 struct obd_device *obd = data;
330 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
333 return snprintf(page, count, "%s\n",
334 mdt->mdt_rmtacl_cache->uc_upcall);
337 static int lprocfs_wr_rmtacl_upcall(struct file *file, const char *buffer,
338 unsigned long count, void *data)
340 struct obd_device *obd = data;
341 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
342 struct upcall_cache *hash = mdt->mdt_rmtacl_cache;
343 char kernbuf[UC_CACHE_UPCALL_MAXPATH] = { '\0' };
345 if (count >= UC_CACHE_UPCALL_MAXPATH) {
346 CERROR("%s: remote ACL upcall too long\n", obd->obd_name);
350 if (copy_from_user(kernbuf, buffer,
351 min(count, UC_CACHE_UPCALL_MAXPATH - 1)))
354 /* Remove any extraneous bits from the upcall (e.g. linefeeds) */
355 sscanf(kernbuf, "%s", hash->uc_upcall);
357 if (strcmp(hash->uc_name, obd->obd_name) != 0)
358 CWARN("%s: write to upcall name %s\n",
359 obd->obd_name, hash->uc_upcall);
360 CWARN("%s: remote ACL upcall set to %s\n", obd->obd_name, hash->uc_upcall);
365 static int lprocfs_wr_rmtacl_info(struct file *file, const char *buffer,
366 unsigned long count, void *data)
368 struct obd_device *obd = data;
369 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
370 struct rmtacl_downcall_data sparam, *param = &sparam;
371 int size = 0, rc = 0;
373 if (count < sizeof(*param)) {
374 CERROR("%s: invalid data size %lu\n", obd->obd_name, count);
378 if (copy_from_user(&sparam, buffer, sizeof(sparam))) {
379 CERROR("%s: bad remote acl data\n", obd->obd_name);
380 GOTO(out, rc = -EFAULT);
383 if (sparam.add_magic != RMTACL_DOWNCALL_MAGIC) {
384 CERROR("%s: MDT remote acl downcall bad params\n", obd->obd_name);
385 GOTO(out, rc = -EINVAL);
388 if (sparam.add_buflen) {
389 size = offsetof(struct rmtacl_downcall_data,
390 add_buf[sparam.add_buflen]);
391 OBD_ALLOC(param, size);
393 CERROR("%s: fail to alloc %d bytes for ino "LPU64"\n",
394 obd->obd_name, size, sparam.add_key);
396 param->add_buflen = 0;
397 } else if (copy_from_user(param, buffer, size)) {
398 CERROR("%s: ino "LPU64" bad remote acl data\n",
399 obd->obd_name, sparam.add_key);
400 OBD_FREE(param, size);
402 param->add_buflen = 0;
406 rc = upcall_cache_downcall(mdt->mdt_rmtacl_cache, 0, param->add_key,
410 if (param && (param != &sparam))
411 OBD_FREE(param, size);
416 static int lprocfs_rd_rootsquash_uid(char *page, char **start, off_t off,
417 int count, int *eof, void *data)
419 struct obd_device *obd = data;
420 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
421 struct rootsquash_info *rsi = mdt->mdt_rootsquash_info;
424 return snprintf(page, count, "%u\n",
425 rsi ? rsi->rsi_uid : 0);
428 static int lprocfs_wr_rootsquash_uid(struct file *file, const char *buffer,
429 unsigned long count, void *data)
431 struct obd_device *obd = data;
432 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
435 rc = lprocfs_write_helper(buffer, count, &val);
439 if (!mdt->mdt_rootsquash_info)
440 OBD_ALLOC_PTR(mdt->mdt_rootsquash_info);
441 if (!mdt->mdt_rootsquash_info)
444 mdt->mdt_rootsquash_info->rsi_uid = val;
448 static int lprocfs_rd_rootsquash_gid(char *page, char **start, off_t off,
449 int count, int *eof, void *data)
451 struct obd_device *obd = data;
452 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
453 struct rootsquash_info *rsi = mdt->mdt_rootsquash_info;
456 return snprintf(page, count, "%u\n",
457 rsi ? rsi->rsi_gid : 0);
460 static int lprocfs_wr_rootsquash_gid(struct file *file, const char *buffer,
461 unsigned long count, void *data)
463 struct obd_device *obd = data;
464 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
467 rc = lprocfs_write_helper(buffer, count, &val);
471 if (!mdt->mdt_rootsquash_info)
472 OBD_ALLOC_PTR(mdt->mdt_rootsquash_info);
473 if (!mdt->mdt_rootsquash_info)
476 mdt->mdt_rootsquash_info->rsi_gid = val;
480 static int lprocfs_rd_nosquash_nids(char *page, char **start, off_t off,
481 int count, int *eof, void *data)
483 struct obd_device *obd = data;
484 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
485 struct rootsquash_info *rsi = mdt->mdt_rootsquash_info;
488 ret = snprintf(page, count, "rootsquash skip list:\n");
489 for (i = 0; rsi && (i < rsi->rsi_n_nosquash_nids); i++) {
490 ret += snprintf(page + ret, count - ret, "%s\n",
491 libcfs_nid2str(rsi->rsi_nosquash_nids[i]));
498 static inline void remove_newline(char *str)
500 int len = strlen(str);
502 if (str[len - 1] == '\n')
506 /* XXX: This macro is copied from lnet/libcfs/nidstring.c */
507 #define LNET_NIDSTR_SIZE 32 /* size of each one (see below for usage) */
509 static void do_process_nosquash_nids(struct mdt_device *m, char *buf)
511 struct rootsquash_info *rsi = m->mdt_rootsquash_info;
512 char str[LNET_NIDSTR_SIZE], *end;
516 rsi->rsi_n_nosquash_nids = 0;
517 while (rsi->rsi_n_nosquash_nids < N_NOSQUASH_NIDS) {
518 end = strchr(buf, ',');
519 memset(str, 0, sizeof(str));
521 strncpy(str, buf, min_t(int, sizeof(str), end - buf));
523 strncpy(str, buf, min_t(int, sizeof(str), strlen(buf)));
525 if (!strcmp(str, "*")) {
528 nid = libcfs_str2nid(str);
529 if (nid == LNET_NID_ANY)
532 rsi->rsi_nosquash_nids[rsi->rsi_n_nosquash_nids++] = nid;
534 if (!end || (*(end + 1) == 0))
540 static int lprocfs_wr_nosquash_nids(struct file *file, const char *buffer,
541 unsigned long count, void *data)
543 struct obd_device *obd = data;
544 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
545 char skips[LNET_NIDSTR_SIZE * N_NOSQUASH_NIDS] = "";
546 unsigned long size = sizeof(skips);
549 CERROR("parameter exceeds max limit %lu\n", size);
553 if (copy_from_user(skips, buffer, min(size, count)))
556 if (!mdt->mdt_rootsquash_info)
557 OBD_ALLOC_PTR(mdt->mdt_rootsquash_info);
558 if (!mdt->mdt_rootsquash_info)
561 remove_newline(skips);
562 do_process_nosquash_nids(mdt, skips);
567 static int lprocfs_rd_capa(char *page, char **start, off_t off,
568 int count, int *eof, void *data)
570 struct obd_device *obd = data;
571 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
573 return snprintf(page, count, "capability on: %s %s\n",
574 mdt->mdt_opts.mo_oss_capa ? "oss" : "",
575 mdt->mdt_opts.mo_mds_capa ? "mds" : "");
578 static int lprocfs_wr_capa(struct file *file, const char *buffer,
579 unsigned long count, void *data)
581 struct obd_device *obd = data;
582 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
585 rc = lprocfs_write_helper(buffer, count, &val);
589 if (val < 0 || val > 3) {
590 CERROR("invalid capability mode, only 0/2/3 is accepted.\n"
591 " 0: disable fid capability\n"
592 " 2: enable MDS fid capability\n"
593 " 3: enable both MDS and OSS fid capability\n");
597 /* OSS fid capability needs enable both MDS and OSS fid capability on
600 CERROR("can't enable OSS fid capability only, you should use "
601 "'3' to enable both MDS and OSS fid capability.\n");
605 mdt->mdt_opts.mo_oss_capa = (val & 0x1);
606 mdt->mdt_opts.mo_mds_capa = !!(val & 0x2);
607 mdt->mdt_capa_conf = 1;
608 LCONSOLE_INFO("MDS %s %s MDS fid capability.\n",
610 mdt->mdt_opts.mo_mds_capa ? "enabled" : "disabled");
611 LCONSOLE_INFO("MDS %s %s OSS fid capability.\n",
613 mdt->mdt_opts.mo_oss_capa ? "enabled" : "disabled");
617 static int lprocfs_rd_capa_count(char *page, char **start, off_t off,
618 int count, int *eof, void *data)
620 return snprintf(page, count, "%d %d\n",
621 capa_count[CAPA_SITE_CLIENT],
622 capa_count[CAPA_SITE_SERVER]);
625 static int lprocfs_rd_site_stats(char *page, char **start, off_t off,
626 int count, int *eof, void *data)
628 struct obd_device *obd = data;
629 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
630 struct lu_site *s = mdt->mdt_md_dev.md_lu_dev.ld_site;
635 * How many hash buckets are not-empty? Don't bother with locks: it's
636 * an estimation anyway.
638 for (i = 0, populated = 0; i < s->ls_hash_size; i++)
639 populated += !hlist_empty(&s->ls_hash[i]);
641 return snprintf(page, count, "%d %d %d/%d %d %d %d %d %d %d\n",
646 s->ls_stats.s_created,
647 s->ls_stats.s_cache_hit,
648 s->ls_stats.s_cache_miss,
649 s->ls_stats.s_cache_check,
650 s->ls_stats.s_cache_race,
651 s->ls_stats.s_lru_purged);
654 static int lprocfs_rd_capa_timeout(char *page, char **start, off_t off,
655 int count, int *eof, void *data)
657 struct obd_device *obd = data;
658 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
660 return snprintf(page, count, "%lu\n", mdt->mdt_capa_timeout);
663 static int lprocfs_wr_capa_timeout(struct file *file, const char *buffer,
664 unsigned long count, void *data)
666 struct obd_device *obd = data;
667 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
670 rc = lprocfs_write_helper(buffer, count, &val);
674 mdt->mdt_capa_timeout = (unsigned long)val;
675 mdt->mdt_capa_conf = 1;
679 static int lprocfs_rd_ck_timeout(char *page, char **start, off_t off, int count,
680 int *eof, void *data)
682 struct obd_device *obd = data;
683 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
685 return snprintf(page, count, "%lu\n", mdt->mdt_ck_timeout);
688 static int lprocfs_wr_ck_timeout(struct file *file, const char *buffer,
689 unsigned long count, void *data)
691 struct obd_device *obd = data;
692 struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev);
695 rc = lprocfs_write_helper(buffer, count, &val);
699 mdt->mdt_ck_timeout = (unsigned long)val;
700 mdt->mdt_capa_conf = 1;
704 static int lprocfs_mdt_wr_evict_client(struct file *file, const char *buffer,
705 unsigned long count, void *data)
707 char tmpbuf[sizeof(struct obd_uuid)];
709 sscanf(buffer, "%40s", tmpbuf);
711 if (strncmp(tmpbuf, "nid:", 4) != 0)
712 return lprocfs_wr_evict_client(file, buffer, count, data);
714 CERROR("NOT implement evict client by nid %s\n", tmpbuf);
719 static struct lprocfs_vars lprocfs_mdt_obd_vars[] = {
720 { "uuid", lprocfs_rd_uuid, 0, 0 },
721 { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
722 { "num_exports", lprocfs_rd_num_exports, 0, 0 },
723 { "identity_expire", lprocfs_rd_identity_expire,
724 lprocfs_wr_identity_expire, 0 },
725 { "identity_acquire_expire", lprocfs_rd_identity_acquire_expire,
726 lprocfs_wr_identity_acquire_expire, 0 },
727 { "identity_upcall", lprocfs_rd_identity_upcall,
728 lprocfs_wr_identity_upcall, 0 },
729 { "identity_flush", 0, lprocfs_wr_identity_flush, 0 },
730 { "identity_info", 0, lprocfs_wr_identity_info, 0 },
731 { "rmtacl_expire", lprocfs_rd_rmtacl_expire,
732 lprocfs_wr_rmtacl_expire, 0 },
733 { "rmtacl_acquire_expire", lprocfs_rd_rmtacl_acquire_expire,
734 lprocfs_wr_rmtacl_acquire_expire, 0 },
735 { "rmtacl_upcall", lprocfs_rd_rmtacl_upcall,
736 lprocfs_wr_rmtacl_upcall, 0 },
737 { "rmtacl_info", 0, lprocfs_wr_rmtacl_info, 0 },
738 { "rootsquash_uid", lprocfs_rd_rootsquash_uid,
739 lprocfs_wr_rootsquash_uid, 0 },
740 { "rootsquash_gid", lprocfs_rd_rootsquash_gid,
741 lprocfs_wr_rootsquash_gid, 0 },
742 { "nosquash_nids", lprocfs_rd_nosquash_nids,
743 lprocfs_wr_nosquash_nids, 0 },
744 { "capa", lprocfs_rd_capa,
745 lprocfs_wr_capa, 0 },
746 { "capa_timeout", lprocfs_rd_capa_timeout,
747 lprocfs_wr_capa_timeout, 0 },
748 { "capa_key_timeout", lprocfs_rd_ck_timeout,
749 lprocfs_wr_ck_timeout, 0 },
750 { "capa_count", lprocfs_rd_capa_count, 0, 0 },
751 { "site_stats", lprocfs_rd_site_stats, 0, 0 },
752 { "evict_client", 0, lprocfs_mdt_wr_evict_client, 0 },
756 static struct lprocfs_vars lprocfs_mdt_module_vars[] = {
757 { "num_refs", lprocfs_rd_numrefs, 0, 0 },
761 void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars)
763 lvars->module_vars = lprocfs_mdt_module_vars;
764 lvars->obd_vars = lprocfs_mdt_obd_vars;