Whamcloud - gitweb
merge b_devel into HEAD (20030703)
[fs/lustre-release.git] / lustre / obdclass / lprocfs_status.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
5  *   Author: Hariharan Thantry <thantry@users.sourceforge.net>
6  *
7  *   This file is part of Lustre, http://www.lustre.org.
8  *
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.
12  *
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.
17  *
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.
21  */
22
23 #define EXPORT_SYMTAB
24 #define DEBUG_SUBSYSTEM S_CLASS
25 #ifdef __KERNEL__
26 #include <linux/config.h>
27 #include <linux/module.h>
28 #include <linux/version.h>
29 #include <linux/slab.h>
30 #include <linux/types.h>
31 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
32 #include <asm/statfs.h>
33 #endif
34 #include <linux/seq_file.h>
35
36 #else
37 #include <liblustre.h>
38 #endif
39
40 #include <linux/obd_class.h>
41 #include <linux/lprocfs_status.h>
42
43 #ifdef LPROCFS
44
45 struct proc_dir_entry *lprocfs_srch(struct proc_dir_entry *head,
46                                     const char *name)
47 {
48         struct proc_dir_entry* temp;
49
50         if (!head)
51                 return NULL;
52
53         temp = head->subdir;
54         while (temp != NULL) {
55                 if (!strcmp(temp->name, name))
56                         return temp;
57
58                 temp = temp->next;
59         }
60         return NULL;
61 }
62
63 /* lprocfs API calls */
64
65 int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *list,
66                      void *data)
67 {
68         if ((root == NULL) || (list == NULL))
69                 return -EINVAL;
70
71         while (list->name) {
72                 struct proc_dir_entry *cur_root, *proc;
73                 char *pathcopy, *cur, *next;
74                 int pathsize = strlen(list->name)+1;
75
76                 proc = NULL;
77                 cur_root = root;
78
79                 /* need copy of path for strsep */
80                 OBD_ALLOC(pathcopy, pathsize);
81                 if (!pathcopy)
82                         return -ENOMEM;
83
84                 next = pathcopy;
85                 strcpy(pathcopy, list->name);
86
87                 while (cur_root && (cur = strsep(&next, "/"))) {
88                         if (*cur =='\0') /* skip double/trailing "/" */
89                                 continue;
90
91                         proc = lprocfs_srch(cur_root, cur);
92                         CDEBUG(D_OTHER, "cur_root=%s, cur=%s, next=%s, (%s)\n",
93                                cur_root->name, cur, next,
94                                (proc ? "exists" : "new"));
95                         if (next)
96                                 cur_root = (proc ? proc :
97                                                    proc_mkdir(cur, cur_root));
98                         else if (!proc) {
99                                 mode_t mode = 0444;
100                                 if (list->write_fptr)
101                                         mode = 0644;
102                                 proc = create_proc_entry(cur, mode, cur_root);
103                         }
104                 }
105
106                 OBD_FREE(pathcopy, pathsize);
107
108                 if ((cur_root == NULL) || (proc == NULL)) {
109                         CERROR("LprocFS: No memory to create /proc entry %s",
110                                list->name);
111                         return -ENOMEM;
112                 }
113
114                 proc->read_proc = list->read_fptr;
115                 proc->write_proc = list->write_fptr;
116                 proc->data = (list->data ? list->data : data);
117                 list++;
118         }
119         return 0;
120 }
121
122 void lprocfs_remove(struct proc_dir_entry* root)
123 {
124         struct proc_dir_entry *temp = root;
125         struct proc_dir_entry *rm_entry;
126         struct proc_dir_entry *parent;
127
128         LASSERT(root != NULL);
129         parent = root->parent;
130         LASSERT(parent != NULL);
131
132         while (1) {
133                 while (temp->subdir)
134                         temp = temp->subdir;
135
136                 rm_entry = temp;
137                 temp = temp->parent;
138                 remove_proc_entry(rm_entry->name, rm_entry->parent);
139                 if (temp == parent)
140                         break;
141         }
142 }
143
144 struct proc_dir_entry *lprocfs_register(const char *name,
145                                         struct proc_dir_entry *parent,
146                                         struct lprocfs_vars *list, void *data)
147 {
148         struct proc_dir_entry *newchild;
149
150         newchild = lprocfs_srch(parent, name);
151         if (newchild) {
152                 CERROR(" Lproc: Attempting to register %s more than once \n",
153                        name);
154                 return ERR_PTR(-EALREADY);
155         }
156
157         newchild = proc_mkdir(name, parent);
158         if (newchild && list) {
159                 int rc = lprocfs_add_vars(newchild, list, data);
160                 if (rc) {
161                         lprocfs_remove(newchild);
162                         return ERR_PTR(rc);
163                 }
164         }
165         return newchild;
166 }
167
168 /* Generic callbacks */
169
170 int lprocfs_rd_u64(char *page, char **start, off_t off,
171                    int count, int *eof, void *data)
172 {
173         LASSERT(data != NULL);
174         *eof = 1;
175         return snprintf(page, count, LPU64"\n", *(__u64 *)data);
176 }
177
178 int lprocfs_rd_uuid(char* page, char **start, off_t off, int count,
179                     int *eof, void *data)
180 {
181         struct obd_device* dev = (struct obd_device*)data;
182
183         LASSERT(dev != NULL);
184         *eof = 1;
185         return snprintf(page, count, "%s\n", dev->obd_uuid.uuid);
186 }
187
188 int lprocfs_rd_name(char *page, char **start, off_t off, int count,
189                     int *eof, void *data)
190 {
191         struct obd_device* dev = (struct obd_device *)data;
192
193         LASSERT(dev != NULL);
194         LASSERT(dev->obd_name != NULL);
195         *eof = 1;
196         return snprintf(page, count, "%s\n", dev->obd_name);
197 }
198
199 int lprocfs_rd_blksize(char* page, char **start, off_t off, int count,
200                        int *eof, struct statfs *sfs)
201 {
202         LASSERT(sfs != NULL);
203         *eof = 1;
204         return snprintf(page, count, "%lu\n", sfs->f_bsize);
205 }
206
207 int lprocfs_rd_kbytestotal(char* page, char **start, off_t off, int count,
208                            int *eof, struct statfs *sfs)
209 {
210         __u32 blk_size;
211         __u64 result;
212
213         LASSERT(sfs != NULL);
214         blk_size = sfs->f_bsize >> 10;
215         result = sfs->f_blocks;
216
217         while (blk_size >>= 1)
218                 result <<= 1;
219
220         *eof = 1;
221         return snprintf(page, count, LPU64"\n", result);
222 }
223
224 int lprocfs_rd_kbytesfree(char* page, char **start, off_t off, int count,
225                           int *eof, struct statfs *sfs)
226 {
227         __u32 blk_size;
228         __u64 result;
229
230         LASSERT(sfs != NULL);
231         blk_size = sfs->f_bsize >> 10;
232         result = sfs->f_bfree;
233
234         while (blk_size >>= 1)
235                 result <<= 1;
236
237         *eof = 1;
238         return snprintf(page, count, LPU64"\n", result);
239 }
240
241 int lprocfs_rd_filestotal(char* page, char **start, off_t off, int count,
242                           int *eof, struct statfs *sfs)
243 {
244         LASSERT(sfs != NULL);
245         *eof = 1;
246         return snprintf(page, count, "%ld\n", sfs->f_files);
247 }
248
249 int lprocfs_rd_filesfree(char* page, char **start, off_t off, int count,
250                          int *eof, struct statfs *sfs)
251 {
252         LASSERT(sfs != NULL);
253         *eof = 1;
254         return snprintf(page, count, "%ld\n", sfs->f_ffree);
255 }
256
257 int lprocfs_rd_filegroups(char* page, char **start, off_t off, int count,
258                           int *eof, struct statfs *sfs)
259 {
260         *eof = 1;
261         return snprintf(page, count, "unimplemented\n");
262 }
263
264 int lprocfs_rd_server_uuid(char* page, char **start, off_t off, int count,
265                            int *eof, void *data)
266 {
267         struct obd_device *obd = (struct obd_device *)data;
268         struct client_obd *cli;
269
270         LASSERT(obd != NULL);
271         cli = &obd->u.cli;
272         *eof = 1;
273         return snprintf(page, count, "%s\n",
274                         cli->cl_import->imp_target_uuid.uuid);
275 }
276
277 int lprocfs_rd_conn_uuid(char *page, char **start, off_t off, int count,
278                          int *eof,  void *data)
279 {
280         struct obd_device *obd = (struct obd_device*)data;
281         struct ptlrpc_connection *conn;
282
283         LASSERT(obd != NULL);
284         conn = obd->u.cli.cl_import->imp_connection;
285         LASSERT(conn != NULL);
286         *eof = 1;
287         return snprintf(page, count, "%s\n", conn->c_remote_uuid.uuid);
288 }
289
290 int lprocfs_rd_numrefs(char *page, char **start, off_t off, int count,
291                        int *eof, void *data)
292 {
293         struct obd_type* class = (struct obd_type*) data;
294
295         LASSERT(class != NULL);
296         *eof = 1;
297         return snprintf(page, count, "%d\n", class->typ_refcnt);
298 }
299
300 int lprocfs_obd_attach(struct obd_device *dev, struct lprocfs_vars *list)
301 {
302         int rc = 0;
303
304         LASSERT(dev != NULL);
305         LASSERT(dev->obd_type != NULL);
306         LASSERT(dev->obd_type->typ_procroot != NULL);
307
308         dev->obd_proc_entry = lprocfs_register(dev->obd_name,
309                                                dev->obd_type->typ_procroot,
310                                                list, dev);
311         if (IS_ERR(dev->obd_proc_entry)) {
312                 rc = PTR_ERR(dev->obd_proc_entry);
313                 dev->obd_proc_entry = NULL;
314         }
315         return rc;
316 }
317
318 int lprocfs_obd_detach(struct obd_device *dev)
319 {
320         if (dev && dev->obd_proc_entry) {
321                 lprocfs_remove(dev->obd_proc_entry);
322                 dev->obd_proc_entry = NULL;
323         }
324         return 0;
325 }
326
327 struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num)
328 {
329         struct lprocfs_stats *stats;
330         struct lprocfs_percpu *percpu;
331         unsigned int percpusize;
332         unsigned int i;
333
334         if (num == 0)
335                 return NULL;
336
337         OBD_ALLOC(stats, offsetof(typeof(*stats), ls_percpu[smp_num_cpus]));
338         if (stats == NULL)
339                 return NULL;
340
341         percpusize = L1_CACHE_ALIGN(offsetof(typeof(*percpu), lp_cntr[num]));
342         stats->ls_percpu_size = smp_num_cpus * percpusize;
343         OBD_ALLOC(stats->ls_percpu[0], stats->ls_percpu_size);
344         if (stats->ls_percpu[0] == NULL) {
345                 OBD_FREE(stats, offsetof(typeof(*stats),
346                                          ls_percpu[smp_num_cpus]));
347                 return NULL;
348         }
349
350         stats->ls_num = num;
351         for (i = 1; i < smp_num_cpus; i++)
352                 stats->ls_percpu[i] = (void *)(stats->ls_percpu[i - 1]) +
353                         percpusize;
354
355         return stats;
356 }
357
358 void lprocfs_free_stats(struct lprocfs_stats *stats)
359 {
360         if (stats->ls_num == 0)
361                 return;
362
363         OBD_FREE(stats->ls_percpu[0], stats->ls_percpu_size);
364         OBD_FREE(stats, offsetof(typeof(*stats), ls_percpu[smp_num_cpus]));
365 }
366
367 /* Reset counter under lock */
368 int lprocfs_counter_write(struct file *file, const char *buffer,
369                           unsigned long count, void *data)
370 {
371         /* not supported */
372         return 0;
373 }
374
375 static void *lprocfs_stats_seq_start(struct seq_file *p, loff_t *pos)
376 {
377         struct lprocfs_stats *stats = p->private;
378         /* return 1st cpu location */
379         return (*pos >= stats->ls_num) ? NULL :
380                 &(stats->ls_percpu[0]->lp_cntr[*pos]);
381 }
382
383 static void lprocfs_stats_seq_stop(struct seq_file *p, void *v)
384 {
385 }
386
387 static void *lprocfs_stats_seq_next(struct seq_file *p, void *v, loff_t *pos)
388 {
389         struct lprocfs_stats *stats = p->private;
390         ++*pos;
391         return (*pos >= stats->ls_num) ? NULL :
392                 &(stats->ls_percpu[0]->lp_cntr[*pos]);
393 }
394
395 /* seq file export of one lprocfs counter */
396 static int lprocfs_stats_seq_show(struct seq_file *p, void *v)
397 {
398        struct lprocfs_stats *stats = p->private;
399        struct lprocfs_counter  *cntr = v;
400        struct lprocfs_counter  t, ret = { .lc_min = ~(__u64)0 };
401        int i, idx, rc;
402
403        if (cntr == &(stats->ls_percpu[0])->lp_cntr[0]) {
404                struct timeval now;
405                do_gettimeofday(&now);
406                rc = seq_printf(p, "%-25s %lu.%lu secs.usecs\n",
407                                "snapshot_time", now.tv_sec, now.tv_usec);
408                if (rc < 0)
409                        return rc;
410        }
411        idx = cntr - &(stats->ls_percpu[0])->lp_cntr[0];
412
413        for (i = 0; i < smp_num_cpus; i++) {
414                struct lprocfs_counter *percpu_cntr =
415                        &(stats->ls_percpu[i])->lp_cntr[idx];
416                int centry;
417                do {
418                         centry = atomic_read(&percpu_cntr->lc_cntl.la_entry);
419                         t.lc_count = percpu_cntr->lc_count;
420                         t.lc_sum = percpu_cntr->lc_sum;
421                         t.lc_min = percpu_cntr->lc_min;
422                         t.lc_max = percpu_cntr->lc_max;
423                         t.lc_sumsquare = percpu_cntr->lc_sumsquare;
424                } while (centry != atomic_read(&percpu_cntr->lc_cntl.la_entry) &&
425                         centry != atomic_read(&percpu_cntr->lc_cntl.la_exit));
426                ret.lc_count += t.lc_count;
427                ret.lc_sum += t.lc_sum;
428                if (t.lc_min < ret.lc_min)
429                        ret.lc_min = t.lc_min;
430                if (t.lc_max > ret.lc_max)
431                        ret.lc_max = t.lc_max;
432                ret.lc_sumsquare += t.lc_sumsquare;
433        }
434
435        rc = seq_printf(p, "%-25s "LPU64" samples [%s]", cntr->lc_name,
436                        ret.lc_count, cntr->lc_units);
437        if (rc < 0)
438                goto out;
439
440        if ((cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) && (ret.lc_count > 0)) {
441                rc = seq_printf(p, " "LPU64" "LPU64" "LPU64,
442                                ret.lc_min, ret.lc_max, ret.lc_sum);
443                if (rc < 0)
444                        goto out;
445                if (cntr->lc_config & LPROCFS_CNTR_STDDEV)
446                        rc = seq_printf(p, " "LPU64, ret.lc_sumsquare);
447                if (rc < 0)
448                        goto out;
449        }
450        rc = seq_printf(p, "\n");
451  out:
452        return (rc < 0) ? rc : 0;
453 }
454
455 struct seq_operations lprocfs_stats_seq_sops = {
456         .start = lprocfs_stats_seq_start,
457         .stop = lprocfs_stats_seq_stop,
458         .next = lprocfs_stats_seq_next,
459         .show = lprocfs_stats_seq_show,
460 };
461
462 static int lprocfs_stats_seq_open(struct inode *inode, struct file *file)
463 {
464         struct proc_dir_entry *dp = inode->u.generic_ip;
465         struct seq_file *seq;
466         int rc;
467
468         rc = seq_open(file, &lprocfs_stats_seq_sops);
469         if (rc)
470                 return rc;
471         seq = file->private_data;
472         seq->private = dp->data;
473         return 0;
474 }
475
476 struct file_operations lprocfs_stats_seq_fops = {
477         .open    = lprocfs_stats_seq_open,
478         .read    = seq_read,
479         .llseek  = seq_lseek,
480         .release = seq_release,
481 };
482
483 int lprocfs_register_stats(struct proc_dir_entry *root, const char* name,
484                            struct lprocfs_stats *stats)
485 {
486         struct proc_dir_entry *entry;
487         LASSERT(root != NULL);
488
489         entry = create_proc_entry(name, 0444, root);
490         if (entry == NULL)
491                 return -ENOMEM;
492         entry->proc_fops = &lprocfs_stats_seq_fops;
493         entry->data = (void *)stats;
494         entry->write_proc = lprocfs_counter_write;
495         return 0;
496 }
497
498 void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
499                           unsigned conf, const char *name, const char *units)
500 {
501         struct lprocfs_counter *c;
502         int i;
503
504         LASSERT(stats != NULL);
505         for (i = 0; i < smp_num_cpus; i++) {
506                 c = &(stats->ls_percpu[i]->lp_cntr[index]);
507                 c->lc_config = conf;
508                 c->lc_min = ~(__u64)0;
509                 c->lc_name = name;
510                 c->lc_units = units;
511         }
512 }
513 EXPORT_SYMBOL(lprocfs_counter_init);
514
515 #define LPROCFS_OBD_OP_INIT(base, stats, op)                               \
516 do {                                                                       \
517         unsigned int coffset = base + OBD_COUNTER_OFFSET(op);              \
518         LASSERT(coffset < stats->ls_num);                                     \
519         lprocfs_counter_init(stats, coffset, 0, #op, "reqs");              \
520 } while (0)
521
522 int lprocfs_alloc_obd_stats(struct obd_device *obd, unsigned num_private_stats)
523 {
524         struct lprocfs_stats *stats;
525         unsigned int num_stats;
526         int rc, i;
527
528         LASSERT(obd->obd_stats == NULL);
529         LASSERT(obd->obd_proc_entry != NULL);
530         LASSERT(obd->obd_cntr_base == 0);
531
532         num_stats = 1 + OBD_COUNTER_OFFSET(destroy_export) +
533                 num_private_stats;
534         stats = lprocfs_alloc_stats(num_stats);
535         if (!stats)
536                 return -ENOMEM;
537
538         LPROCFS_OBD_OP_INIT(num_private_stats, stats, iocontrol);
539         LPROCFS_OBD_OP_INIT(num_private_stats, stats, get_info);
540         LPROCFS_OBD_OP_INIT(num_private_stats, stats, set_info);
541         LPROCFS_OBD_OP_INIT(num_private_stats, stats, attach);
542         LPROCFS_OBD_OP_INIT(num_private_stats, stats, detach);
543         LPROCFS_OBD_OP_INIT(num_private_stats, stats, setup);
544         LPROCFS_OBD_OP_INIT(num_private_stats, stats, cleanup);
545         LPROCFS_OBD_OP_INIT(num_private_stats, stats, connect);
546         LPROCFS_OBD_OP_INIT(num_private_stats, stats, disconnect);
547         LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs);
548         LPROCFS_OBD_OP_INIT(num_private_stats, stats, syncfs);
549         LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);
550         LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd);
551         LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate);
552         LPROCFS_OBD_OP_INIT(num_private_stats, stats, create);
553         LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy);
554         LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr);
555         LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr);
556         LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr_async);
557         LPROCFS_OBD_OP_INIT(num_private_stats, stats, open);
558         LPROCFS_OBD_OP_INIT(num_private_stats, stats, close);
559         LPROCFS_OBD_OP_INIT(num_private_stats, stats, brw);
560         LPROCFS_OBD_OP_INIT(num_private_stats, stats, brw_async);
561         LPROCFS_OBD_OP_INIT(num_private_stats, stats, punch);
562         LPROCFS_OBD_OP_INIT(num_private_stats, stats, sync);
563         LPROCFS_OBD_OP_INIT(num_private_stats, stats, migrate);
564         LPROCFS_OBD_OP_INIT(num_private_stats, stats, copy);
565         LPROCFS_OBD_OP_INIT(num_private_stats, stats, iterate);
566         LPROCFS_OBD_OP_INIT(num_private_stats, stats, preprw);
567         LPROCFS_OBD_OP_INIT(num_private_stats, stats, commitrw);
568         LPROCFS_OBD_OP_INIT(num_private_stats, stats, enqueue);
569         LPROCFS_OBD_OP_INIT(num_private_stats, stats, match);
570         LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel);
571         LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel_unused);
572         LPROCFS_OBD_OP_INIT(num_private_stats, stats, san_preprw);
573         LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy_export);
574
575         for (i = num_private_stats; i < num_stats; i++) {
576                 /* If this assertion failed, it is likely that an obd
577                  * operation was added to struct obd_ops in
578                  * <linux/obd.h>, and that the corresponding line item
579                  * LPROCFS_OBD_OP_INIT(.., .., opname)
580                  * is missing from the list above. */
581                 LASSERT(&(stats->ls_percpu[0])->lp_cntr[i].lc_name != NULL);
582         }
583         rc = lprocfs_register_stats(obd->obd_proc_entry, "stats", stats);
584         if (rc < 0) {
585                 lprocfs_free_stats(stats);
586         } else {
587                 obd->obd_stats  = stats;
588                 obd->obd_cntr_base = num_private_stats;
589         }
590         return rc;
591 }
592
593 void lprocfs_free_obd_stats(struct obd_device *obd)
594 {
595         struct lprocfs_stats *stats = obd->obd_stats;
596
597         if (stats != NULL) {
598                 obd->obd_stats = NULL;
599                 lprocfs_free_stats(stats);
600         }
601 }
602
603 #endif /* LPROCFS*/
604
605 EXPORT_SYMBOL(lprocfs_register);
606 EXPORT_SYMBOL(lprocfs_srch);
607 EXPORT_SYMBOL(lprocfs_remove);
608 EXPORT_SYMBOL(lprocfs_add_vars);
609 EXPORT_SYMBOL(lprocfs_obd_attach);
610 EXPORT_SYMBOL(lprocfs_obd_detach);
611 EXPORT_SYMBOL(lprocfs_alloc_stats);
612 EXPORT_SYMBOL(lprocfs_free_stats);
613 EXPORT_SYMBOL(lprocfs_register_stats);
614 EXPORT_SYMBOL(lprocfs_alloc_obd_stats);
615 EXPORT_SYMBOL(lprocfs_free_obd_stats);
616
617 EXPORT_SYMBOL(lprocfs_rd_u64);
618 EXPORT_SYMBOL(lprocfs_rd_uuid);
619 EXPORT_SYMBOL(lprocfs_rd_name);
620 EXPORT_SYMBOL(lprocfs_rd_server_uuid);
621 EXPORT_SYMBOL(lprocfs_rd_conn_uuid);
622 EXPORT_SYMBOL(lprocfs_rd_numrefs);
623
624 EXPORT_SYMBOL(lprocfs_rd_blksize);
625 EXPORT_SYMBOL(lprocfs_rd_kbytestotal);
626 EXPORT_SYMBOL(lprocfs_rd_kbytesfree);
627 EXPORT_SYMBOL(lprocfs_rd_filestotal);
628 EXPORT_SYMBOL(lprocfs_rd_filesfree);
629 EXPORT_SYMBOL(lprocfs_rd_filegroups);