Whamcloud - gitweb
LU-3336 lfsck: use rbtree to record OST-object accessing
[fs/lustre-release.git] / lustre / ofd / lproc_ofd.c
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; If not, see
18  * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
19  *
20  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21  * CA 95054 USA or visit www.sun.com if you need additional information or
22  * have any questions.
23  *
24  * GPL HEADER END
25  */
26 /*
27  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
28  * Use is subject to license terms.
29  *
30  * Copyright (c) 2012, 2013, Intel Corporation.
31  */
32 /*
33  * This file is part of Lustre, http://www.lustre.org/
34  * Lustre is a trademark of Sun Microsystems, Inc.
35  *
36  * lustre/ofd/lproc_ofd.c
37  */
38
39 #define DEBUG_SUBSYSTEM S_CLASS
40
41 #include <obd.h>
42 #include <lprocfs_status.h>
43 #include <linux/seq_file.h>
44 #include <lustre_lfsck.h>
45
46 #include "ofd_internal.h"
47
48 #ifdef LPROCFS
49
50 static int lprocfs_ofd_rd_seqs(char *page, char **start, off_t off,
51                                 int count, int *eof, void *data)
52 {
53         struct obd_device *obd = (struct obd_device *)data;
54         struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
55
56         *eof = 1;
57         return snprintf(page, count, "%u\n", ofd->ofd_seq_count);
58 }
59
60 static int lprocfs_ofd_rd_tot_dirty(char *page, char **start, off_t off,
61                                     int count, int *eof, void *data)
62 {
63         struct obd_device *obd = (struct obd_device *)data;
64         struct ofd_device *ofd;
65
66         LASSERT(obd != NULL);
67         ofd = ofd_dev(obd->obd_lu_dev);
68         *eof = 1;
69         return snprintf(page, count, LPU64"\n", ofd->ofd_tot_dirty);
70 }
71
72 static int lprocfs_ofd_rd_tot_granted(char *page, char **start, off_t off,
73                                       int count, int *eof, void *data)
74 {
75         struct obd_device *obd = (struct obd_device *)data;
76         struct ofd_device *ofd;
77
78         LASSERT(obd != NULL);
79         ofd = ofd_dev(obd->obd_lu_dev);
80         *eof = 1;
81         return snprintf(page, count, LPU64"\n", ofd->ofd_tot_granted);
82 }
83
84 static int lprocfs_ofd_rd_tot_pending(char *page, char **start, off_t off,
85                                       int count, int *eof, void *data)
86 {
87         struct obd_device *obd = (struct obd_device *)data;
88         struct ofd_device *ofd;
89
90         LASSERT(obd != NULL);
91         ofd = ofd_dev(obd->obd_lu_dev);
92         *eof = 1;
93         return snprintf(page, count, LPU64"\n", ofd->ofd_tot_pending);
94 }
95
96 static int lprocfs_ofd_rd_grant_precreate(char *page, char **start, off_t off,
97                                           int count, int *eof, void *data)
98 {
99         struct obd_device *obd = (struct obd_device *)data;
100
101         LASSERT(obd != NULL);
102         *eof = 1;
103         return snprintf(page, count, "%ld\n",
104                         obd->obd_self_export->exp_filter_data.fed_grant);
105 }
106
107 static int lprocfs_ofd_rd_grant_ratio(char *page, char **start, off_t off,
108                                       int count, int *eof, void *data)
109 {
110         struct obd_device *obd = (struct obd_device *)data;
111         struct ofd_device *ofd;
112
113         LASSERT(obd != NULL);
114         ofd = ofd_dev(obd->obd_lu_dev);
115         *eof = 1;
116         return snprintf(page, count, "%d%%\n",
117                         (int) ofd_grant_reserved(ofd, 100));
118 }
119
120 static int lprocfs_ofd_wr_grant_ratio(struct file *file, const char *buffer,
121                                       unsigned long count, void *data)
122 {
123         struct obd_device       *obd = (struct obd_device *)data;
124         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
125         int                      val;
126         int                      rc;
127
128         rc = lprocfs_write_helper(buffer, count, &val);
129         if (rc)
130                 return rc;
131
132         if (val > 100 || val < 0)
133                 return -EINVAL;
134
135         if (val == 0)
136                 CWARN("%s: disabling grant error margin\n", obd->obd_name);
137         if (val > 50)
138                 CWARN("%s: setting grant error margin >50%%, be warned that "
139                       "a huge part of the free space is now reserved for "
140                       "grants\n", obd->obd_name);
141
142         spin_lock(&ofd->ofd_grant_lock);
143         ofd->ofd_grant_ratio = ofd_grant_ratio_conv(val);
144         spin_unlock(&ofd->ofd_grant_lock);
145         return count;
146 }
147
148 static int lprocfs_ofd_rd_precreate_batch(char *page, char **start, off_t off,
149                                           int count, int *eof, void *data)
150 {
151         struct obd_device *obd = (struct obd_device *)data;
152         struct ofd_device *ofd;
153
154         LASSERT(obd != NULL);
155         ofd = ofd_dev(obd->obd_lu_dev);
156         *eof = 1;
157         return snprintf(page, count, "%d\n", ofd->ofd_precreate_batch);
158 }
159
160 static int lprocfs_ofd_wr_precreate_batch(struct file *file, const char *buffer,
161                                           unsigned long count, void *data)
162 {
163         struct obd_device *obd = (struct obd_device *)data;
164         struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
165         int val;
166         int rc;
167
168         rc = lprocfs_write_helper(buffer, count, &val);
169         if (rc)
170                 return rc;
171
172         if (val < 1)
173                 return -EINVAL;
174
175         spin_lock(&ofd->ofd_batch_lock);
176         ofd->ofd_precreate_batch = val;
177         spin_unlock(&ofd->ofd_batch_lock);
178         return count;
179 }
180
181 static int lprocfs_ofd_rd_last_id(char *page, char **start, off_t off,
182                                   int count, int *eof, void *data)
183 {
184         struct obd_device       *obd = data;
185         struct ofd_device       *ofd;
186         struct ofd_seq          *oseq = NULL;
187         int                     retval = 0, rc;
188
189         if (obd == NULL)
190                 return 0;
191
192         ofd = ofd_dev(obd->obd_lu_dev);
193
194         read_lock(&ofd->ofd_seq_list_lock);
195         cfs_list_for_each_entry(oseq, &ofd->ofd_seq_list, os_list) {
196                 __u64 seq;
197
198                 seq = ostid_seq(&oseq->os_oi) == 0 ?
199                       fid_idif_seq(ostid_id(&oseq->os_oi),
200                                    ofd->ofd_lut.lut_lsd.lsd_osd_index) :
201                       ostid_seq(&oseq->os_oi);
202                 rc = snprintf(page, count, DOSTID"\n", seq,
203                               ostid_id(&oseq->os_oi));
204                 if (rc < 0) {
205                         retval = rc;
206                         break;
207                 }
208                 page += rc;
209                 count -= rc;
210                 retval += rc;
211         }
212         read_unlock(&ofd->ofd_seq_list_lock);
213         return retval;
214 }
215
216 int lprocfs_ofd_rd_fmd_max_num(char *page, char **start, off_t off,
217                                int count, int *eof, void *data)
218 {
219         struct obd_device       *obd = data;
220         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
221         int                      rc;
222
223         rc = snprintf(page, count, "%u\n", ofd->ofd_fmd_max_num);
224         return rc;
225 }
226
227 int lprocfs_ofd_wr_fmd_max_num(struct file *file, const char *buffer,
228                                unsigned long count, void *data)
229 {
230         struct obd_device       *obd = data;
231         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
232         int                      val;
233         int                      rc;
234
235         rc = lprocfs_write_helper(buffer, count, &val);
236         if (rc)
237                 return rc;
238
239         if (val > 65536 || val < 1)
240                 return -EINVAL;
241
242         ofd->ofd_fmd_max_num = val;
243         return count;
244 }
245
246 int lprocfs_ofd_rd_fmd_max_age(char *page, char **start, off_t off,
247                                int count, int *eof, void *data)
248 {
249         struct obd_device       *obd = data;
250         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
251         int                      rc;
252
253         rc = snprintf(page, count, "%ld\n", ofd->ofd_fmd_max_age / HZ);
254         return rc;
255 }
256
257 int lprocfs_ofd_wr_fmd_max_age(struct file *file, const char *buffer,
258                                unsigned long count, void *data)
259 {
260         struct obd_device       *obd = data;
261         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
262         int                      val;
263         int                      rc;
264
265         rc = lprocfs_write_helper(buffer, count, &val);
266         if (rc)
267                 return rc;
268
269         if (val > 65536 || val < 1)
270                 return -EINVAL;
271
272         ofd->ofd_fmd_max_age = val * HZ;
273         return count;
274 }
275
276 static int lprocfs_ofd_rd_capa(char *page, char **start, off_t off,
277                                int count, int *eof, void *data)
278 {
279         struct obd_device       *obd = data;
280         int                      rc;
281
282         rc = snprintf(page, count, "capability on: %s\n",
283                       obd->u.filter.fo_fl_oss_capa ? "oss" : "");
284         return rc;
285 }
286
287 static int lprocfs_ofd_wr_capa(struct file *file, const char *buffer,
288                                unsigned long count, void *data)
289 {
290         struct obd_device       *obd = data;
291         int                      val, rc;
292
293         rc = lprocfs_write_helper(buffer, count, &val);
294         if (rc)
295                 return rc;
296
297         if (val & ~0x1) {
298                 CERROR("invalid capability mode, only 0/1 are accepted.\n"
299                        " 1: enable oss fid capability\n"
300                        " 0: disable oss fid capability\n");
301                 return -EINVAL;
302         }
303
304         obd->u.filter.fo_fl_oss_capa = val;
305         LCONSOLE_INFO("OSS %s %s fid capability.\n", obd->obd_name,
306                       val ? "enabled" : "disabled");
307         return count;
308 }
309
310 static int lprocfs_ofd_rd_capa_count(char *page, char **start, off_t off,
311                                      int count, int *eof, void *data)
312 {
313         return snprintf(page, count, "%d %d\n",
314                         capa_count[CAPA_SITE_CLIENT],
315                         capa_count[CAPA_SITE_SERVER]);
316 }
317
318 int lprocfs_ofd_rd_degraded(char *page, char **start, off_t off,
319                             int count, int *eof, void *data)
320 {
321         struct obd_device *obd = data;
322         struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
323
324         return snprintf(page, count, "%u\n", ofd->ofd_raid_degraded);
325 }
326
327 int lprocfs_ofd_wr_degraded(struct file *file, const char *buffer,
328                             unsigned long count, void *data)
329 {
330         struct obd_device       *obd = data;
331         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
332         int                      val, rc;
333
334         rc = lprocfs_write_helper(buffer, count, &val);
335         if (rc)
336                 return rc;
337
338         spin_lock(&ofd->ofd_flags_lock);
339         ofd->ofd_raid_degraded = !!val;
340         spin_unlock(&ofd->ofd_flags_lock);
341
342         return count;
343 }
344
345 int lprocfs_ofd_rd_fstype(char *page, char **start, off_t off, int count,
346                           int *eof, void *data)
347 {
348         struct obd_device *obd = data;
349         struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
350         struct lu_device  *d;
351
352         LASSERT(ofd->ofd_osd);
353         d = &ofd->ofd_osd->dd_lu_dev;
354         LASSERT(d->ld_type);
355         return snprintf(page, count, "%s\n", d->ld_type->ldt_name);
356 }
357
358 int lprocfs_ofd_rd_syncjournal(char *page, char **start, off_t off,
359                                int count, int *eof, void *data)
360 {
361         struct obd_device       *obd = data;
362         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
363         int                      rc;
364
365         rc = snprintf(page, count, "%u\n", ofd->ofd_syncjournal);
366         return rc;
367 }
368
369 int lprocfs_ofd_wr_syncjournal(struct file *file, const char *buffer,
370                                unsigned long count, void *data)
371 {
372         struct obd_device       *obd = data;
373         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
374         int                      val;
375         int                      rc;
376
377         rc = lprocfs_write_helper(buffer, count, &val);
378         if (rc)
379                 return rc;
380
381         if (val < 0)
382                 return -EINVAL;
383
384         spin_lock(&ofd->ofd_flags_lock);
385         ofd->ofd_syncjournal = !!val;
386         ofd_slc_set(ofd);
387         spin_unlock(&ofd->ofd_flags_lock);
388
389         return count;
390 }
391
392 static char *sync_on_cancel_states[] = {"never",
393                                         "blocking",
394                                         "always" };
395
396 int lprocfs_ofd_rd_sync_lock_cancel(char *page, char **start, off_t off,
397                                     int count, int *eof, void *data)
398 {
399         struct obd_device       *obd = data;
400         struct lu_target        *tgt = obd->u.obt.obt_lut;
401         int                      rc;
402
403         rc = snprintf(page, count, "%s\n",
404                       sync_on_cancel_states[tgt->lut_sync_lock_cancel]);
405         return rc;
406 }
407
408 int lprocfs_ofd_wr_sync_lock_cancel(struct file *file, const char *buffer,
409                                     unsigned long count, void *data)
410 {
411         struct obd_device       *obd = data;
412         struct lu_target        *tgt = obd->u.obt.obt_lut;
413         int                      val = -1;
414         int                      i;
415
416         for (i = 0 ; i < NUM_SYNC_ON_CANCEL_STATES; i++) {
417                 if (memcmp(buffer, sync_on_cancel_states[i],
418                            strlen(sync_on_cancel_states[i])) == 0) {
419                         val = i;
420                         break;
421                 }
422         }
423         if (val == -1) {
424                 int rc;
425
426                 rc = lprocfs_write_helper(buffer, count, &val);
427                 if (rc)
428                         return rc;
429         }
430
431         if (val < 0 || val > 2)
432                 return -EINVAL;
433
434         spin_lock(&tgt->lut_flags_lock);
435         tgt->lut_sync_lock_cancel = val;
436         spin_unlock(&tgt->lut_flags_lock);
437         return count;
438 }
439
440 int lprocfs_ofd_rd_grant_compat_disable(char *page, char **start, off_t off,
441                                         int count, int *eof, void *data)
442 {
443         struct obd_device       *obd = data;
444         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
445         int                      rc;
446
447         rc = snprintf(page, count, "%u\n", ofd->ofd_grant_compat_disable);
448         return rc;
449 }
450
451 int lprocfs_ofd_wr_grant_compat_disable(struct file *file, const char *buffer,
452                                         unsigned long count, void *data)
453 {
454         struct obd_device       *obd = data;
455         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
456         int                      val;
457         int                      rc;
458
459         rc = lprocfs_write_helper(buffer, count, &val);
460         if (rc)
461                 return rc;
462
463         if (val < 0)
464                 return -EINVAL;
465
466         spin_lock(&ofd->ofd_flags_lock);
467         ofd->ofd_grant_compat_disable = !!val;
468         spin_unlock(&ofd->ofd_flags_lock);
469
470         return count;
471 }
472
473 int lprocfs_ofd_rd_soft_sync_limit(char *page, char **start, off_t off,
474                                    int count, int *eof, void *data)
475 {
476         struct obd_device       *obd = data;
477         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
478
479         return lprocfs_rd_uint(page, start, off, count, eof,
480                                &ofd->ofd_soft_sync_limit);
481 }
482
483 int lprocfs_ofd_wr_soft_sync_limit(struct file *file, const char *buffer,
484                                    unsigned long count, void *data)
485 {
486         struct obd_device       *obd = data;
487         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
488
489         return lprocfs_wr_uint(file, buffer, count, &ofd->ofd_soft_sync_limit);
490 }
491
492 static int lprocfs_rd_lfsck_speed_limit(char *page, char **start, off_t off,
493                                         int count, int *eof, void *data)
494 {
495         struct obd_device       *obd = data;
496         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
497
498         *eof = 1;
499
500         return lfsck_get_speed(ofd->ofd_osd, page, count);
501 }
502
503 static int lprocfs_wr_lfsck_speed_limit(struct file *file, const char *buffer,
504                                         unsigned long count, void *data)
505 {
506         struct obd_device       *obd = data;
507         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
508         __u32                    val;
509         int                      rc;
510
511         rc = lprocfs_write_helper(buffer, count, &val);
512         if (rc != 0)
513                 return rc;
514
515         rc = lfsck_set_speed(ofd->ofd_osd, val);
516
517         return rc != 0 ? rc : count;
518 }
519
520 static int lprocfs_rd_lfsck_layout(char *page, char **start, off_t off,
521                                    int count, int *eof, void *data)
522 {
523         struct obd_device       *obd = data;
524         struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
525
526         *eof = 1;
527
528         return lfsck_dump(ofd->ofd_osd, page, count, LT_LAYOUT);
529 }
530
531 static struct lprocfs_vars lprocfs_ofd_obd_vars[] = {
532         { "uuid",                lprocfs_rd_uuid, 0, 0 },
533         { "blocksize",           lprocfs_rd_blksize, 0, 0 },
534         { "kbytestotal",         lprocfs_rd_kbytestotal, 0, 0 },
535         { "kbytesfree",          lprocfs_rd_kbytesfree, 0, 0 },
536         { "kbytesavail",         lprocfs_rd_kbytesavail, 0, 0 },
537         { "filestotal",          lprocfs_rd_filestotal, 0, 0 },
538         { "filesfree",           lprocfs_rd_filesfree, 0, 0 },
539         { "seqs_allocated",      lprocfs_ofd_rd_seqs, 0, 0 },
540         { "fstype",              lprocfs_ofd_rd_fstype, 0, 0 },
541         { "last_id",             lprocfs_ofd_rd_last_id, 0, 0 },
542         { "tot_dirty",           lprocfs_ofd_rd_tot_dirty,   0, 0 },
543         { "tot_pending",         lprocfs_ofd_rd_tot_pending, 0, 0 },
544         { "tot_granted",         lprocfs_ofd_rd_tot_granted, 0, 0 },
545         { "grant_precreate",     lprocfs_ofd_rd_grant_precreate, 0, 0 },
546         { "grant_ratio",         lprocfs_ofd_rd_grant_ratio,
547                                  lprocfs_ofd_wr_grant_ratio, 0, 0 },
548         { "precreate_batch",     lprocfs_ofd_rd_precreate_batch,
549                                  lprocfs_ofd_wr_precreate_batch, 0 },
550         { "recovery_status",     lprocfs_obd_rd_recovery_status, 0, 0 },
551         { "recovery_time_soft",  lprocfs_obd_rd_recovery_time_soft,
552                                  lprocfs_obd_wr_recovery_time_soft, 0},
553         { "recovery_time_hard",  lprocfs_obd_rd_recovery_time_hard,
554                                  lprocfs_obd_wr_recovery_time_hard, 0},
555         { "evict_client",        0, lprocfs_wr_evict_client, 0,
556                                  &lprocfs_evict_client_fops},
557         { "num_exports",         lprocfs_rd_num_exports,   0, 0 },
558         { "degraded",            lprocfs_ofd_rd_degraded,
559                                  lprocfs_ofd_wr_degraded, 0},
560         { "sync_journal",        lprocfs_ofd_rd_syncjournal,
561                                  lprocfs_ofd_wr_syncjournal, 0 },
562         { "sync_on_lock_cancel", lprocfs_ofd_rd_sync_lock_cancel,
563                                  lprocfs_ofd_wr_sync_lock_cancel, 0 },
564         { "instance",            lprocfs_target_rd_instance, 0 },
565         { "ir_factor",           lprocfs_obd_rd_ir_factor,
566                                  lprocfs_obd_wr_ir_factor, 0},
567         { "grant_compat_disable", lprocfs_ofd_rd_grant_compat_disable,
568                                   lprocfs_ofd_wr_grant_compat_disable, 0 },
569         { "client_cache_count",  lprocfs_ofd_rd_fmd_max_num,
570                                  lprocfs_ofd_wr_fmd_max_num, 0 },
571         { "client_cache_seconds", lprocfs_ofd_rd_fmd_max_age,
572                                   lprocfs_ofd_wr_fmd_max_age, 0 },
573         { "capa",                lprocfs_ofd_rd_capa,
574                                  lprocfs_ofd_wr_capa, 0 },
575         { "capa_count",          lprocfs_ofd_rd_capa_count, 0, 0 },
576         { "job_cleanup_interval", lprocfs_rd_job_interval,
577                                   lprocfs_wr_job_interval, 0},
578         { "soft_sync_limit",     lprocfs_ofd_rd_soft_sync_limit,
579                                  lprocfs_ofd_wr_soft_sync_limit, 0},
580         { "lfsck_speed_limit",  lprocfs_rd_lfsck_speed_limit,
581                                 lprocfs_wr_lfsck_speed_limit, 0 },
582         { "lfsck_layout",       lprocfs_rd_lfsck_layout, 0, 0 },
583         { 0 }
584 };
585
586 static struct lprocfs_vars lprocfs_ofd_module_vars[] = {
587         { "num_refs",     lprocfs_rd_numrefs,   0, 0 },
588         { 0 }
589 };
590
591 void lprocfs_ofd_init_vars(struct lprocfs_static_vars *lvars)
592 {
593         lvars->module_vars  = lprocfs_ofd_module_vars;
594         lvars->obd_vars     = lprocfs_ofd_obd_vars;
595 }
596
597 void ofd_stats_counter_init(struct lprocfs_stats *stats)
598 {
599         LASSERT(stats && stats->ls_num >= LPROC_OFD_STATS_LAST);
600
601         lprocfs_counter_init(stats, LPROC_OFD_STATS_READ,
602                              LPROCFS_CNTR_AVGMINMAX, "read_bytes", "bytes");
603         lprocfs_counter_init(stats, LPROC_OFD_STATS_WRITE,
604                              LPROCFS_CNTR_AVGMINMAX, "write_bytes", "bytes");
605         lprocfs_counter_init(stats, LPROC_OFD_STATS_GETATTR,
606                              0, "getattr", "reqs");
607         lprocfs_counter_init(stats, LPROC_OFD_STATS_SETATTR,
608                              0, "setattr", "reqs");
609         lprocfs_counter_init(stats, LPROC_OFD_STATS_PUNCH,
610                              0, "punch", "reqs");
611         lprocfs_counter_init(stats, LPROC_OFD_STATS_SYNC,
612                              0, "sync", "reqs");
613         lprocfs_counter_init(stats, LPROC_OFD_STATS_DESTROY,
614                              0, "destroy", "reqs");
615         lprocfs_counter_init(stats, LPROC_OFD_STATS_CREATE,
616                              0, "create", "reqs");
617         lprocfs_counter_init(stats, LPROC_OFD_STATS_STATFS,
618                              0, "statfs", "reqs");
619         lprocfs_counter_init(stats, LPROC_OFD_STATS_GET_INFO,
620                              0, "get_info", "reqs");
621         lprocfs_counter_init(stats, LPROC_OFD_STATS_SET_INFO,
622                              0, "set_info", "reqs");
623         lprocfs_counter_init(stats, LPROC_OFD_STATS_QUOTACTL,
624                              0, "quotactl", "reqs");
625 }
626
627 #endif /* LPROCFS */