1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
5 * Author: Hariharan Thantry <thantry@users.sourceforge.net>
7 * This file is part of Lustre, http://www.lustre.org.
9 * Lustre is free software; you can redistribute it and/or
10 * modify it under the terms of version 2 of the GNU General Public
11 * License as published by the Free Software Foundation.
13 * Lustre is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Lustre; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 # define EXPORT_SYMTAB
26 #define DEBUG_SUBSYSTEM S_CLASS
29 # include <linux/config.h>
30 # include <linux/module.h>
31 # include <linux/version.h>
32 # include <linux/slab.h>
33 # include <linux/types.h>
34 # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
35 # include <asm/statfs.h>
37 # include <linux/seq_file.h>
38 #else /* __KERNEL__ */
39 # include <liblustre.h>
42 #include <linux/obd_class.h>
43 #include <linux/lprocfs_status.h>
44 #include <linux/lustre_fsfilt.h>
46 #if defined(LPROCFS) && defined(__KERNEL__)
48 struct proc_dir_entry *lprocfs_srch(struct proc_dir_entry *head,
51 struct proc_dir_entry *temp;
57 while (temp != NULL) {
58 if (strcmp(temp->name, name) == 0)
66 /* lprocfs API calls */
68 int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *list,
71 if (root == NULL || list == NULL)
74 while (list->name != NULL) {
75 struct proc_dir_entry *cur_root, *proc;
76 char *pathcopy, *cur, *next, pathbuf[64];
77 int pathsize = strlen(list->name) + 1;
82 /* need copy of path for strsep */
83 if (strlen(list->name) > sizeof(pathbuf) - 1) {
84 OBD_ALLOC(pathcopy, pathsize);
92 strcpy(pathcopy, list->name);
94 while (cur_root != NULL && (cur = strsep(&next, "/"))) {
95 if (*cur =='\0') /* skip double/trailing "/" */
98 proc = lprocfs_srch(cur_root, cur);
99 CDEBUG(D_OTHER, "cur_root=%s, cur=%s, next=%s, (%s)\n",
100 cur_root->name, cur, next,
101 (proc ? "exists" : "new"));
103 cur_root = (proc ? proc :
104 proc_mkdir(cur, cur_root));
105 } else if (proc == NULL) {
109 if (list->write_fptr)
111 proc = create_proc_entry(cur, mode, cur_root);
115 if (pathcopy != pathbuf)
116 OBD_FREE(pathcopy, pathsize);
118 if (cur_root == NULL || proc == NULL) {
119 CERROR("LprocFS: No memory to create /proc entry %s",
124 proc->read_proc = list->read_fptr;
125 proc->write_proc = list->write_fptr;
126 proc->data = (list->data ? list->data : data);
132 void lprocfs_remove(struct proc_dir_entry *root)
134 struct proc_dir_entry *temp = root;
135 struct proc_dir_entry *rm_entry;
136 struct proc_dir_entry *parent;
138 LASSERT(root != NULL);
139 parent = root->parent;
140 LASSERT(parent != NULL);
143 while (temp->subdir != NULL)
149 /* Memory corruption once caused this to fail, and
150 without this LASSERT we would loop here forever. */
151 LASSERTF(strlen(rm_entry->name) == rm_entry->namelen,
152 "0x%p %s/%s len %d\n", rm_entry, temp->name,
153 rm_entry->name, (int)strlen(rm_entry->name));
155 remove_proc_entry(rm_entry->name, rm_entry->parent);
161 struct proc_dir_entry *lprocfs_register(const char *name,
162 struct proc_dir_entry *parent,
163 struct lprocfs_vars *list, void *data)
165 struct proc_dir_entry *newchild;
167 newchild = lprocfs_srch(parent, name);
168 if (newchild != NULL) {
169 CERROR(" Lproc: Attempting to register %s more than once \n",
171 return ERR_PTR(-EALREADY);
174 newchild = proc_mkdir(name, parent);
175 if (newchild != NULL && list != NULL) {
176 int rc = lprocfs_add_vars(newchild, list, data);
178 lprocfs_remove(newchild);
185 /* Generic callbacks */
187 int lprocfs_rd_u64(char *page, char **start, off_t off,
188 int count, int *eof, void *data)
190 LASSERT(data != NULL);
192 return snprintf(page, count, LPU64"\n", *(__u64 *)data);
195 int lprocfs_rd_uuid(char *page, char **start, off_t off, int count,
196 int *eof, void *data)
198 struct obd_device *dev = (struct obd_device*)data;
200 LASSERT(dev != NULL);
202 return snprintf(page, count, "%s\n", dev->obd_uuid.uuid);
205 int lprocfs_rd_name(char *page, char **start, off_t off, int count,
206 int *eof, void* data)
208 struct obd_device *dev = (struct obd_device *)data;
210 LASSERT(dev != NULL);
211 LASSERT(dev->obd_name != NULL);
213 return snprintf(page, count, "%s\n", dev->obd_name);
216 int lprocfs_rd_fstype(char *page, char **start, off_t off, int count, int *eof,
219 struct obd_device *obd = (struct obd_device *)data;
221 LASSERT(obd != NULL);
222 LASSERT(obd->obd_fsops != NULL);
223 LASSERT(obd->obd_fsops->fs_type != NULL);
224 return snprintf(page, count, "%s\n", obd->obd_fsops->fs_type);
227 int lprocfs_rd_blksize(char *page, char **start, off_t off, int count,
228 int *eof, void *data)
230 struct obd_statfs osfs;
231 int rc = obd_statfs(data, &osfs, jiffies - HZ);
234 rc = snprintf(page, count, "%u\n", osfs.os_bsize);
239 int lprocfs_rd_kbytestotal(char *page, char **start, off_t off, int count,
240 int *eof, void *data)
242 struct obd_statfs osfs;
243 int rc = obd_statfs(data, &osfs, jiffies - HZ);
245 __u32 blk_size = osfs.os_bsize >> 10;
246 __u64 result = osfs.os_blocks;
248 while (blk_size >>= 1)
252 rc = snprintf(page, count, LPU64"\n", result);
257 int lprocfs_rd_kbytesfree(char *page, char **start, off_t off, int count,
258 int *eof, void *data)
260 struct obd_statfs osfs;
261 int rc = obd_statfs(data, &osfs, jiffies - HZ);
263 __u32 blk_size = osfs.os_bsize >> 10;
264 __u64 result = osfs.os_bfree;
266 while (blk_size >>= 1)
270 rc = snprintf(page, count, LPU64"\n", result);
275 int lprocfs_rd_kbytesavail(char *page, char **start, off_t off, int count,
276 int *eof, void *data)
278 struct obd_statfs osfs;
279 int rc = obd_statfs(data, &osfs, jiffies - HZ);
281 __u32 blk_size = osfs.os_bsize >> 10;
282 __u64 result = osfs.os_bavail;
284 while (blk_size >>= 1)
288 rc = snprintf(page, count, LPU64"\n", result);
293 int lprocfs_rd_filestotal(char *page, char **start, off_t off, int count,
294 int *eof, void *data)
296 struct obd_statfs osfs;
297 int rc = obd_statfs(data, &osfs, jiffies - HZ);
300 rc = snprintf(page, count, LPU64"\n", osfs.os_files);
306 int lprocfs_rd_filesfree(char *page, char **start, off_t off, int count,
307 int *eof, void *data)
309 struct obd_statfs osfs;
310 int rc = obd_statfs(data, &osfs, jiffies - HZ);
313 rc = snprintf(page, count, LPU64"\n", osfs.os_ffree);
318 int lprocfs_rd_filegroups(char *page, char **start, off_t off, int count,
319 int *eof, void *data)
322 return snprintf(page, count, "unimplemented\n");
325 int lprocfs_rd_server_uuid(char *page, char **start, off_t off, int count,
326 int *eof, void *data)
328 struct obd_device *obd = (struct obd_device *)data;
329 struct obd_import *imp;
330 char *imp_state_name = NULL;
332 LASSERT(obd != NULL);
333 imp = obd->u.cli.cl_import;
334 imp_state_name = ptlrpc_import_state_name(imp->imp_state);
336 return snprintf(page, count, "%s\t%s\n",
337 imp->imp_target_uuid.uuid, imp_state_name);
340 int lprocfs_rd_conn_uuid(char *page, char **start, off_t off, int count,
341 int *eof, void *data)
343 struct obd_device *obd = (struct obd_device*)data;
344 struct ptlrpc_connection *conn;
346 LASSERT(obd != NULL);
347 conn = obd->u.cli.cl_import->imp_connection;
348 LASSERT(conn != NULL);
350 return snprintf(page, count, "%s\n", conn->c_remote_uuid.uuid);
353 int lprocfs_rd_numrefs(char *page, char **start, off_t off, int count,
354 int *eof, void *data)
356 struct obd_type *class = (struct obd_type*) data;
358 LASSERT(class != NULL);
360 return snprintf(page, count, "%d\n", class->typ_refcnt);
363 int lprocfs_obd_attach(struct obd_device *dev, struct lprocfs_vars *list)
367 LASSERT(dev != NULL);
368 LASSERT(dev->obd_type != NULL);
369 LASSERT(dev->obd_type->typ_procroot != NULL);
371 dev->obd_proc_entry = lprocfs_register(dev->obd_name,
372 dev->obd_type->typ_procroot,
374 if (IS_ERR(dev->obd_proc_entry)) {
375 rc = PTR_ERR(dev->obd_proc_entry);
376 dev->obd_proc_entry = NULL;
381 int lprocfs_obd_detach(struct obd_device *dev)
383 if (dev && dev->obd_proc_entry) {
384 lprocfs_remove(dev->obd_proc_entry);
385 dev->obd_proc_entry = NULL;
390 struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num)
392 struct lprocfs_stats *stats;
393 struct lprocfs_percpu *percpu;
394 unsigned int percpusize;
400 OBD_ALLOC(stats, offsetof(typeof(*stats), ls_percpu[num_online_cpus()]));
404 percpusize = L1_CACHE_ALIGN(offsetof(typeof(*percpu), lp_cntr[num]));
405 stats->ls_percpu_size = num_online_cpus() * percpusize;
406 OBD_ALLOC(stats->ls_percpu[0], stats->ls_percpu_size);
407 if (stats->ls_percpu[0] == NULL) {
408 OBD_FREE(stats, offsetof(typeof(*stats),
409 ls_percpu[num_online_cpus()]));
414 for (i = 1; i < num_online_cpus(); i++)
415 stats->ls_percpu[i] = (void *)(stats->ls_percpu[i - 1]) +
421 void lprocfs_free_stats(struct lprocfs_stats *stats)
423 if (stats->ls_num == 0)
426 OBD_FREE(stats->ls_percpu[0], stats->ls_percpu_size);
427 OBD_FREE(stats, offsetof(typeof(*stats), ls_percpu[num_online_cpus()]));
430 /* Reset counter under lock */
431 int lprocfs_counter_write(struct file *file, const char *buffer,
432 unsigned long count, void *data)
438 static void *lprocfs_stats_seq_start(struct seq_file *p, loff_t *pos)
440 struct lprocfs_stats *stats = p->private;
441 /* return 1st cpu location */
442 return (*pos >= stats->ls_num) ? NULL :
443 &(stats->ls_percpu[0]->lp_cntr[*pos]);
446 static void lprocfs_stats_seq_stop(struct seq_file *p, void *v)
450 static void *lprocfs_stats_seq_next(struct seq_file *p, void *v, loff_t *pos)
452 struct lprocfs_stats *stats = p->private;
454 return (*pos >= stats->ls_num) ? NULL :
455 &(stats->ls_percpu[0]->lp_cntr[*pos]);
458 /* seq file export of one lprocfs counter */
459 static int lprocfs_stats_seq_show(struct seq_file *p, void *v)
461 struct lprocfs_stats *stats = p->private;
462 struct lprocfs_counter *cntr = v;
463 struct lprocfs_counter t, ret = { .lc_min = ~(__u64)0 };
466 if (cntr == &(stats->ls_percpu[0])->lp_cntr[0]) {
468 do_gettimeofday(&now);
469 rc = seq_printf(p, "%-25s %lu.%lu secs.usecs\n",
470 "snapshot_time", now.tv_sec, now.tv_usec);
474 idx = cntr - &(stats->ls_percpu[0])->lp_cntr[0];
476 for (i = 0; i < num_online_cpus(); i++) {
477 struct lprocfs_counter *percpu_cntr =
478 &(stats->ls_percpu[i])->lp_cntr[idx];
482 centry = atomic_read(&percpu_cntr->lc_cntl.la_entry);
483 t.lc_count = percpu_cntr->lc_count;
484 t.lc_sum = percpu_cntr->lc_sum;
485 t.lc_min = percpu_cntr->lc_min;
486 t.lc_max = percpu_cntr->lc_max;
487 t.lc_sumsquare = percpu_cntr->lc_sumsquare;
488 } while (centry != atomic_read(&percpu_cntr->lc_cntl.la_entry) &&
489 centry != atomic_read(&percpu_cntr->lc_cntl.la_exit));
490 ret.lc_count += t.lc_count;
491 ret.lc_sum += t.lc_sum;
492 if (t.lc_min < ret.lc_min)
493 ret.lc_min = t.lc_min;
494 if (t.lc_max > ret.lc_max)
495 ret.lc_max = t.lc_max;
496 ret.lc_sumsquare += t.lc_sumsquare;
499 rc = seq_printf(p, "%-25s "LPU64" samples [%s]", cntr->lc_name,
500 ret.lc_count, cntr->lc_units);
504 if ((cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) && (ret.lc_count > 0)) {
505 rc = seq_printf(p, " "LPU64" "LPU64" "LPU64,
506 ret.lc_min, ret.lc_max, ret.lc_sum);
509 if (cntr->lc_config & LPROCFS_CNTR_STDDEV)
510 rc = seq_printf(p, " "LPU64, ret.lc_sumsquare);
514 rc = seq_printf(p, "\n");
516 return (rc < 0) ? rc : 0;
519 struct seq_operations lprocfs_stats_seq_sops = {
520 start: lprocfs_stats_seq_start,
521 stop: lprocfs_stats_seq_stop,
522 next: lprocfs_stats_seq_next,
523 show: lprocfs_stats_seq_show,
526 static int lprocfs_stats_seq_open(struct inode *inode, struct file *file)
528 struct proc_dir_entry *dp = PDE(inode);
529 struct seq_file *seq;
532 rc = seq_open(file, &lprocfs_stats_seq_sops);
535 seq = file->private_data;
536 seq->private = dp->data;
540 struct file_operations lprocfs_stats_seq_fops = {
541 open: lprocfs_stats_seq_open,
544 release: seq_release,
547 int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
548 struct lprocfs_stats *stats)
550 struct proc_dir_entry *entry;
551 LASSERT(root != NULL);
553 entry = create_proc_entry(name, 0444, root);
556 entry->proc_fops = &lprocfs_stats_seq_fops;
557 entry->data = (void *)stats;
558 entry->write_proc = lprocfs_counter_write;
562 void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
563 unsigned conf, const char *name, const char *units)
565 struct lprocfs_counter *c;
568 LASSERT(stats != NULL);
569 for (i = 0; i < num_online_cpus(); i++) {
570 c = &(stats->ls_percpu[i]->lp_cntr[index]);
572 c->lc_min = ~(__u64)0;
577 EXPORT_SYMBOL(lprocfs_counter_init);
579 #define LPROCFS_OBD_OP_INIT(base, stats, op) \
581 unsigned int coffset = base + OBD_COUNTER_OFFSET(op); \
582 LASSERT(coffset < stats->ls_num); \
583 lprocfs_counter_init(stats, coffset, 0, #op, "reqs"); \
586 int lprocfs_alloc_obd_stats(struct obd_device *obd, unsigned num_private_stats)
588 struct lprocfs_stats *stats;
589 unsigned int num_stats;
592 LASSERT(obd->obd_stats == NULL);
593 LASSERT(obd->obd_proc_entry != NULL);
594 LASSERT(obd->obd_cntr_base == 0);
596 num_stats = 1 + OBD_COUNTER_OFFSET(notify) +
598 stats = lprocfs_alloc_stats(num_stats);
602 LPROCFS_OBD_OP_INIT(num_private_stats, stats, iocontrol);
603 LPROCFS_OBD_OP_INIT(num_private_stats, stats, get_info);
604 LPROCFS_OBD_OP_INIT(num_private_stats, stats, set_info);
605 LPROCFS_OBD_OP_INIT(num_private_stats, stats, attach);
606 LPROCFS_OBD_OP_INIT(num_private_stats, stats, detach);
607 LPROCFS_OBD_OP_INIT(num_private_stats, stats, setup);
608 LPROCFS_OBD_OP_INIT(num_private_stats, stats, precleanup);
609 LPROCFS_OBD_OP_INIT(num_private_stats, stats, cleanup);
610 LPROCFS_OBD_OP_INIT(num_private_stats, stats, postrecov);
611 LPROCFS_OBD_OP_INIT(num_private_stats, stats, connect);
612 LPROCFS_OBD_OP_INIT(num_private_stats, stats, disconnect);
613 LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs);
614 LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);
615 LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd);
616 LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate);
617 LPROCFS_OBD_OP_INIT(num_private_stats, stats, create);
618 LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy);
619 LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr);
620 LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr);
621 LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr_async);
622 LPROCFS_OBD_OP_INIT(num_private_stats, stats, brw);
623 LPROCFS_OBD_OP_INIT(num_private_stats, stats, brw_async);
624 LPROCFS_OBD_OP_INIT(num_private_stats, stats, prep_async_page);
625 LPROCFS_OBD_OP_INIT(num_private_stats, stats, queue_async_io);
626 LPROCFS_OBD_OP_INIT(num_private_stats, stats, set_async_flags);
627 LPROCFS_OBD_OP_INIT(num_private_stats, stats, queue_group_io);
628 LPROCFS_OBD_OP_INIT(num_private_stats, stats, trigger_group_io);
629 LPROCFS_OBD_OP_INIT(num_private_stats, stats, teardown_async_page);
630 LPROCFS_OBD_OP_INIT(num_private_stats, stats, punch);
631 LPROCFS_OBD_OP_INIT(num_private_stats, stats, sync);
632 LPROCFS_OBD_OP_INIT(num_private_stats, stats, migrate);
633 LPROCFS_OBD_OP_INIT(num_private_stats, stats, copy);
634 LPROCFS_OBD_OP_INIT(num_private_stats, stats, iterate);
635 LPROCFS_OBD_OP_INIT(num_private_stats, stats, preprw);
636 LPROCFS_OBD_OP_INIT(num_private_stats, stats, commitrw);
637 LPROCFS_OBD_OP_INIT(num_private_stats, stats, enqueue);
638 LPROCFS_OBD_OP_INIT(num_private_stats, stats, match);
639 LPROCFS_OBD_OP_INIT(num_private_stats, stats, change_cbdata);
640 LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel);
641 LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel_unused);
642 LPROCFS_OBD_OP_INIT(num_private_stats, stats, san_preprw);
643 LPROCFS_OBD_OP_INIT(num_private_stats, stats, init_export);
644 LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy_export);
645 LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_init);
646 LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_finish);
647 LPROCFS_OBD_OP_INIT(num_private_stats, stats, pin);
648 LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpin);
649 LPROCFS_OBD_OP_INIT(num_private_stats, stats, import_event);
650 LPROCFS_OBD_OP_INIT(num_private_stats, stats, notify);
652 for (i = num_private_stats; i < num_stats; i++) {
653 /* If this LBUGs, it is likely that an obd
654 * operation was added to struct obd_ops in
655 * <linux/obd.h>, and that the corresponding line item
656 * LPROCFS_OBD_OP_INIT(.., .., opname)
657 * is missing from the list above. */
658 if (stats->ls_percpu[0]->lp_cntr[i].lc_name == NULL) {
659 CERROR("Missing obd_stat initializer obd_op "
660 "operation at offset %d. Aborting.\n",
661 i - num_private_stats);
665 rc = lprocfs_register_stats(obd->obd_proc_entry, "stats", stats);
667 lprocfs_free_stats(stats);
669 obd->obd_stats = stats;
670 obd->obd_cntr_base = num_private_stats;
675 void lprocfs_free_obd_stats(struct obd_device *obd)
677 struct lprocfs_stats *stats = obd->obd_stats;
680 obd->obd_stats = NULL;
681 lprocfs_free_stats(stats);
685 int lprocfs_write_helper(const char *buffer, unsigned long count,
688 char kernbuf[20], *end;
690 if (count > (sizeof(kernbuf) - 1))
693 if (copy_from_user(kernbuf, buffer, count))
696 kernbuf[count] = '\0';
698 *val = simple_strtol(kernbuf, &end, 0);
705 int lprocfs_write_u64_helper(const char *buffer, unsigned long count,
708 char kernbuf[22], *end;
710 if (count > (sizeof(kernbuf) - 1))
713 if (copy_from_user(kernbuf, buffer, count))
716 kernbuf[count] = '\0';
718 *val = simple_strtoull(kernbuf, &end, 0);
725 int lprocfs_obd_seq_create(struct obd_device *dev, char *name, mode_t mode,
726 struct file_operations *seq_fops, void *data)
728 struct proc_dir_entry *entry;
731 entry = create_proc_entry(name, mode, dev->obd_proc_entry);
734 entry->proc_fops = seq_fops;
739 EXPORT_SYMBOL(lprocfs_obd_seq_create);
741 void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value)
745 if (value >= OBD_HIST_MAX)
746 value = OBD_HIST_MAX - 1;
748 spin_lock_irqsave(&oh->oh_lock, flags);
749 oh->oh_buckets[value]++;
750 spin_unlock_irqrestore(&oh->oh_lock, flags);
752 EXPORT_SYMBOL(lprocfs_oh_tally);
754 void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value)
758 for (val = 0; ((1 << val) < value) && (val <= OBD_HIST_MAX); val++)
761 lprocfs_oh_tally(oh, val);
763 EXPORT_SYMBOL(lprocfs_oh_tally_log2);
765 unsigned long lprocfs_oh_sum(struct obd_histogram *oh)
767 unsigned long ret = 0;
770 for (i = 0; i < OBD_HIST_MAX; i++)
771 ret += oh->oh_buckets[i];
774 EXPORT_SYMBOL(lprocfs_oh_sum);
776 void lprocfs_oh_clear(struct obd_histogram *oh)
779 spin_lock_irqsave(&oh->oh_lock, flags);
780 memset(oh->oh_buckets, 0, sizeof(oh->oh_buckets));
781 spin_unlock_irqrestore(&oh->oh_lock, flags);
783 EXPORT_SYMBOL(lprocfs_oh_clear);
787 EXPORT_SYMBOL(lprocfs_register);
788 EXPORT_SYMBOL(lprocfs_srch);
789 EXPORT_SYMBOL(lprocfs_remove);
790 EXPORT_SYMBOL(lprocfs_add_vars);
791 EXPORT_SYMBOL(lprocfs_obd_attach);
792 EXPORT_SYMBOL(lprocfs_obd_detach);
793 EXPORT_SYMBOL(lprocfs_alloc_stats);
794 EXPORT_SYMBOL(lprocfs_free_stats);
795 EXPORT_SYMBOL(lprocfs_register_stats);
796 EXPORT_SYMBOL(lprocfs_alloc_obd_stats);
797 EXPORT_SYMBOL(lprocfs_free_obd_stats);
799 EXPORT_SYMBOL(lprocfs_rd_u64);
800 EXPORT_SYMBOL(lprocfs_rd_uuid);
801 EXPORT_SYMBOL(lprocfs_rd_name);
802 EXPORT_SYMBOL(lprocfs_rd_fstype);
803 EXPORT_SYMBOL(lprocfs_rd_server_uuid);
804 EXPORT_SYMBOL(lprocfs_rd_conn_uuid);
805 EXPORT_SYMBOL(lprocfs_rd_numrefs);
807 EXPORT_SYMBOL(lprocfs_rd_blksize);
808 EXPORT_SYMBOL(lprocfs_rd_kbytestotal);
809 EXPORT_SYMBOL(lprocfs_rd_kbytesfree);
810 EXPORT_SYMBOL(lprocfs_rd_kbytesavail);
811 EXPORT_SYMBOL(lprocfs_rd_filestotal);
812 EXPORT_SYMBOL(lprocfs_rd_filesfree);
813 EXPORT_SYMBOL(lprocfs_rd_filegroups);
815 EXPORT_SYMBOL(lprocfs_write_helper);
816 EXPORT_SYMBOL(lprocfs_write_u64_helper);