1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2002 Cluster File Systems, Inc.
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Top level header file for LProc SNMP
22 * Author: Hariharan Thantry thantry@users.sourceforge.net
24 #ifndef _LPROCFS_SNMP_H
25 #define _LPROCFS_SNMP_H
27 #include <lustre/lustre_idl.h>
28 #if defined(__linux__)
29 #include <linux/lprocfs_status.h>
30 #elif defined(__APPLE__)
31 #include <darwin/lprocfs_status.h>
32 #elif defined(__WINNT__)
33 #include <winnt/lprocfs_status.h>
35 #error Unsupported operating system.
39 #if (defined(__KERNEL__) && defined(CONFIG_PROC_FS))
45 cfs_read_proc_t *read_fptr;
46 cfs_write_proc_t *write_fptr;
48 struct file_operations *fops;
51 struct lprocfs_static_vars {
52 struct lprocfs_vars *module_vars;
53 struct lprocfs_vars *obd_vars;
56 /* if we find more consumers this could be generalized */
57 #define OBD_HIST_MAX 32
58 struct obd_histogram {
60 unsigned long oh_buckets[OBD_HIST_MAX];
82 struct obd_histogram hist[BRW_LAST];
86 /* An lprocfs counter can be configured using the enum bit masks below.
88 * LPROCFS_CNTR_EXTERNALLOCK indicates that an external lock already
89 * protects this counter from concurrent updates. If not specified,
90 * lprocfs an internal per-counter lock variable. External locks are
91 * not used to protect counter increments, but are used to protect
92 * counter readout and resets.
94 * LPROCFS_CNTR_AVGMINMAX indicates a multi-valued counter samples,
95 * (i.e. counter can be incremented by more than "1"). When specified,
96 * the counter maintains min, max and sum in addition to a simple
97 * invocation count. This allows averages to be be computed.
98 * If not specified, the counter is an increment-by-1 counter.
99 * min, max, sum, etc. are not maintained.
101 * LPROCFS_CNTR_STDDEV indicates that the counter should track sum of
102 * squares (for multi-valued counter samples only). This allows
103 * external computation of standard deviation, but involves a 64-bit
104 * multiply per counter increment.
108 LPROCFS_CNTR_EXTERNALLOCK = 0x0001,
109 LPROCFS_CNTR_AVGMINMAX = 0x0002,
110 LPROCFS_CNTR_STDDEV = 0x0004,
112 /* counter data type */
113 LPROCFS_TYPE_REGS = 0x0100,
114 LPROCFS_TYPE_BYTES = 0x0200,
115 LPROCFS_TYPE_PAGES = 0x0400,
116 LPROCFS_TYPE_CYCLE = 0x0800,
119 struct lprocfs_atomic {
124 struct lprocfs_counter {
125 struct lprocfs_atomic lc_cntl; /* may need to move to per set */
126 unsigned int lc_config;
132 const char *lc_name; /* must be static */
133 const char *lc_units; /* must be static */
136 struct lprocfs_percpu {
137 struct lprocfs_counter lp_cntr[0];
140 #define LPROCFS_GET_NUM_CPU 0x0001
141 #define LPROCFS_GET_SMP_ID 0x0002
143 enum lprocfs_stats_flags {
144 LPROCFS_STATS_FLAG_PERCPU = 0x0000, /* per cpu counter */
145 LPROCFS_STATS_FLAG_NOPERCPU = 0x0001, /* stats have no percpu
146 * area and need locking */
149 enum lprocfs_fields_flags {
150 LPROCFS_FIELDS_FLAGS_CONFIG = 0x0001,
151 LPROCFS_FIELDS_FLAGS_SUM = 0x0002,
152 LPROCFS_FIELDS_FLAGS_MIN = 0x0003,
153 LPROCFS_FIELDS_FLAGS_MAX = 0x0004,
154 LPROCFS_FIELDS_FLAGS_AVG = 0x0005,
155 LPROCFS_FIELDS_FLAGS_SUMSQUARE = 0x0006,
156 LPROCFS_FIELDS_FLAGS_COUNT = 0x0007,
159 struct lprocfs_stats {
160 unsigned int ls_num; /* # of counters */
161 unsigned int ls_percpu_size;
162 int ls_flags; /* See LPROCFS_STATS_FLAG_* */
163 spinlock_t ls_lock; /* Lock used only when there are
164 * no percpu stats areas */
165 struct lprocfs_percpu *ls_percpu[0];
168 static inline int opcode_offset(__u32 opc) {
169 if (opc < OST_LAST_OPC) {
171 return (opc - OST_FIRST_OPC);
172 } else if (opc < MDS_LAST_OPC) {
174 return (opc - MDS_FIRST_OPC +
175 (OST_LAST_OPC - OST_FIRST_OPC));
176 } else if (opc < LDLM_LAST_OPC) {
178 return (opc - LDLM_FIRST_OPC +
179 (MDS_LAST_OPC - MDS_FIRST_OPC) +
180 (OST_LAST_OPC - OST_FIRST_OPC));
181 } else if (opc < MGS_LAST_OPC) {
183 return (opc - MGS_FIRST_OPC +
184 (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
185 (MDS_LAST_OPC - MDS_FIRST_OPC) +
186 (OST_LAST_OPC - OST_FIRST_OPC));
187 } else if (opc < OBD_LAST_OPC) {
189 return (opc - OBD_FIRST_OPC +
190 (MGS_LAST_OPC - MGS_FIRST_OPC) +
191 (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
192 (MDS_LAST_OPC - MDS_FIRST_OPC) +
193 (OST_LAST_OPC - OST_FIRST_OPC));
194 } else if (opc < LLOG_LAST_OPC) {
196 return (opc - LLOG_FIRST_OPC +
197 (OBD_LAST_OPC - OBD_FIRST_OPC) +
198 (MGS_LAST_OPC - MGS_FIRST_OPC) +
199 (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
200 (MDS_LAST_OPC - MDS_FIRST_OPC) +
201 (OST_LAST_OPC - OST_FIRST_OPC));
202 } else if (opc < FLD_LAST_OPC) {
204 return (opc - FLD_FIRST_OPC +
205 (LLOG_LAST_OPC - LLOG_FIRST_OPC) +
206 (OBD_LAST_OPC - OBD_FIRST_OPC) +
207 (MGS_LAST_OPC - MGS_FIRST_OPC) +
208 (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
209 (MDS_LAST_OPC - MDS_FIRST_OPC) +
210 (OST_LAST_OPC - OST_FIRST_OPC));
211 } else if (opc < SEQ_LAST_OPC) {
213 return (opc - SEQ_FIRST_OPC +
214 (FLD_LAST_OPC - FLD_FIRST_OPC) +
215 (LLOG_LAST_OPC - LLOG_FIRST_OPC) +
216 (OBD_LAST_OPC - OBD_FIRST_OPC) +
217 (MGS_LAST_OPC - MGS_FIRST_OPC) +
218 (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
219 (MDS_LAST_OPC - MDS_FIRST_OPC) +
220 (OST_LAST_OPC - OST_FIRST_OPC));
221 } else if (opc < SEC_LAST_OPC) {
223 return (opc - SEC_FIRST_OPC +
224 (SEQ_LAST_OPC - SEQ_FIRST_OPC) +
225 (FLD_LAST_OPC - FLD_FIRST_OPC) +
226 (LLOG_LAST_OPC - LLOG_FIRST_OPC) +
227 (OBD_LAST_OPC - OBD_FIRST_OPC) +
228 (MGS_LAST_OPC - MGS_FIRST_OPC) +
229 (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
230 (MDS_LAST_OPC - MDS_FIRST_OPC) +
231 (OST_LAST_OPC - OST_FIRST_OPC));
238 #define LUSTRE_MAX_OPCODES ((LDLM_LAST_OPC - LDLM_FIRST_OPC) + \
239 (MDS_LAST_OPC - MDS_FIRST_OPC) + \
240 (OST_LAST_OPC - OST_FIRST_OPC) + \
241 (OBD_LAST_OPC - OBD_FIRST_OPC) + \
242 (FLD_LAST_OPC - FLD_FIRST_OPC) + \
243 (SEQ_LAST_OPC - SEQ_FIRST_OPC) + \
244 (MGS_LAST_OPC - MGS_FIRST_OPC) + \
245 (LLOG_LAST_OPC - LLOG_FIRST_OPC) + \
246 (SEC_LAST_OPC - SEC_FIRST_OPC))
248 #define EXTRA_MAX_OPCODES ((PTLRPC_LAST_CNTR - PTLRPC_FIRST_CNTR) + \
249 (EXTRA_LAST_OPC - EXTRA_FIRST_OPC))
252 PTLRPC_REQWAIT_CNTR = 0,
253 PTLRPC_REQQDEPTH_CNTR,
254 PTLRPC_REQACTIVE_CNTR,
256 PTLRPC_REQBUF_AVAIL_CNTR,
260 #define PTLRPC_FIRST_CNTR PTLRPC_REQWAIT_CNTR
263 LDLM_GLIMPSE_ENQUEUE = 0,
277 #define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE
279 extern cfs_proc_dir_entry_t *proc_lustre_root;
283 struct obd_histogram;
287 static inline int lprocfs_stats_lock(struct lprocfs_stats *stats, int type)
291 if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) {
292 if (type & LPROCFS_GET_NUM_CPU)
294 if (type & LPROCFS_GET_SMP_ID)
296 spin_lock(&stats->ls_lock);
298 if (type & LPROCFS_GET_NUM_CPU)
299 rc = num_possible_cpus();
300 if (type & LPROCFS_GET_SMP_ID)
301 rc = smp_processor_id();
306 static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats)
308 if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU)
309 spin_unlock(&stats->ls_lock);
312 /* Two optimized LPROCFS counter increment functions are provided:
313 * lprocfs_counter_incr(cntr, value) - optimized for by-one counters
314 * lprocfs_counter_add(cntr) - use for multi-valued counters
315 * Counter data layout allows config flag, counter lock and the
316 * count itself to reside within a single cache line.
319 extern void lprocfs_counter_add(struct lprocfs_stats *stats, int idx,
321 extern void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx,
324 #define lprocfs_counter_incr(stats, idx) \
325 lprocfs_counter_add(stats, idx, 1)
326 #define lprocfs_counter_decr(stats, idx) \
327 lprocfs_counter_sub(stats, idx, 1)
329 extern __s64 lprocfs_read_helper(struct lprocfs_counter *lc,
330 enum lprocfs_fields_flags field);
331 static inline __u64 lprocfs_stats_collector(struct lprocfs_stats *stats,
333 enum lprocfs_fields_flags field)
338 LASSERT(stats != NULL);
339 for (i = 0; i < num_possible_cpus(); i++)
340 ret += lprocfs_read_helper(&(stats->ls_percpu[i]->lp_cntr[idx]),
345 extern struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num,
346 enum lprocfs_stats_flags flags);
347 extern void lprocfs_clear_stats(struct lprocfs_stats *stats);
348 extern void lprocfs_free_stats(struct lprocfs_stats **stats);
349 extern void lprocfs_init_ops_stats(int num_private_stats,
350 struct lprocfs_stats *stats);
351 extern int lprocfs_alloc_obd_stats(struct obd_device *obddev,
352 unsigned int num_private_stats);
353 extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
354 unsigned conf, const char *name,
356 extern void lprocfs_free_obd_stats(struct obd_device *obddev);
358 extern int lprocfs_exp_setup(struct obd_export *exp);
359 extern int lprocfs_exp_cleanup(struct obd_export *exp);
360 extern int lprocfs_register_stats(cfs_proc_dir_entry_t *root, const char *name,
361 struct lprocfs_stats *stats);
363 /* lprocfs_status.c */
364 extern int lprocfs_add_vars(cfs_proc_dir_entry_t *root,
365 struct lprocfs_vars *var,
368 extern cfs_proc_dir_entry_t *lprocfs_register(const char *name,
369 cfs_proc_dir_entry_t *parent,
370 struct lprocfs_vars *list,
373 extern void lprocfs_remove(cfs_proc_dir_entry_t **root);
375 extern cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *root,
378 extern int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list);
379 extern int lprocfs_obd_cleanup(struct obd_device *obd);
380 extern struct file_operations lprocfs_evict_client_fops;
382 extern int lprocfs_seq_create(cfs_proc_dir_entry_t *parent, char *name,
383 mode_t mode, struct file_operations *seq_fops,
385 extern int lprocfs_obd_seq_create(struct obd_device *dev, char *name,
386 mode_t mode, struct file_operations *seq_fops,
389 /* Generic callbacks */
391 extern int lprocfs_rd_u64(char *page, char **start, off_t off,
392 int count, int *eof, void *data);
393 extern int lprocfs_rd_atomic(char *page, char **start, off_t off,
394 int count, int *eof, void *data);
395 extern int lprocfs_wr_atomic(struct file *file, const char *buffer,
396 unsigned long count, void *data);
397 extern int lprocfs_rd_uint(char *page, char **start, off_t off,
398 int count, int *eof, void *data);
399 extern int lprocfs_wr_uint(struct file *file, const char *buffer,
400 unsigned long count, void *data);
401 extern int lprocfs_rd_uuid(char *page, char **start, off_t off,
402 int count, int *eof, void *data);
403 extern int lprocfs_rd_name(char *page, char **start, off_t off,
404 int count, int *eof, void *data);
405 extern int lprocfs_rd_fstype(char *page, char **start, off_t off,
406 int count, int *eof, void *data);
407 extern int lprocfs_rd_server_uuid(char *page, char **start, off_t off,
408 int count, int *eof, void *data);
409 extern int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
410 int count, int *eof, void *data);
411 extern int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
412 int count, int *eof, void *data);
413 extern int lprocfs_rd_num_exports(char *page, char **start, off_t off,
414 int count, int *eof, void *data);
415 extern int lprocfs_rd_numrefs(char *page, char **start, off_t off,
416 int count, int *eof, void *data);
417 extern int lprocfs_wr_evict_client(struct file *file, const char *buffer,
418 unsigned long count, void *data);
419 extern int lprocfs_wr_ping(struct file *file, const char *buffer,
420 unsigned long count, void *data);
423 extern int lprocfs_rd_blksize(char *page, char **start, off_t off,
424 int count, int *eof, void *data);
425 extern int lprocfs_rd_kbytestotal(char *page, char **start, off_t off,
426 int count, int *eof, void *data);
427 extern int lprocfs_rd_kbytesfree(char *page, char **start, off_t off,
428 int count, int *eof, void *data);
429 extern int lprocfs_rd_kbytesavail(char *page, char **start, off_t off,
430 int count, int *eof, void *data);
431 extern int lprocfs_rd_filestotal(char *page, char **start, off_t off,
432 int count, int *eof, void *data);
433 extern int lprocfs_rd_filesfree(char *page, char **start, off_t off,
434 int count, int *eof, void *data);
435 extern int lprocfs_rd_filegroups(char *page, char **start, off_t off,
436 int count, int *eof, void *data);
438 extern int lprocfs_write_helper(const char *buffer, unsigned long count,
440 extern int lprocfs_write_frac_helper(const char *buffer, unsigned long count,
442 extern int lprocfs_read_frac_helper(char *buffer, unsigned long count,
444 extern int lprocfs_write_u64_helper(const char *buffer, unsigned long count,
446 extern int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
447 __u64 *val, int mult);
448 void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value);
449 void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value);
450 void lprocfs_oh_clear(struct obd_histogram *oh);
451 unsigned long lprocfs_oh_sum(struct obd_histogram *oh);
453 /* lprocfs_status.c: counter read/write functions */
454 extern int lprocfs_counter_read(char *page, char **start, off_t off,
455 int count, int *eof, void *data);
456 extern int lprocfs_counter_write(struct file *file, const char *buffer,
457 unsigned long count, void *data);
459 /* lprocfs_status.c: recovery status */
460 int lprocfs_obd_rd_recovery_status(char *page, char **start, off_t off,
461 int count, int *eof, void *data);
463 extern int lprocfs_seq_release(struct inode *, struct file *);
465 /* in lprocfs_stat.c, to protect the private data for proc entries */
466 extern struct rw_semaphore _lprocfs_lock;
467 #define LPROCFS_ENTRY() do { \
468 down_read(&_lprocfs_lock); \
470 #define LPROCFS_EXIT() do { \
471 up_read(&_lprocfs_lock); \
473 #define LPROCFS_ENTRY_AND_CHECK(dp) do { \
474 typecheck(struct proc_dir_entry *, dp); \
476 if ((dp)->deleted) { \
482 /* You must use these macros when you want to refer to
483 * the import in a client obd_device for a lprocfs entry */
484 #define LPROCFS_CLIMP_CHECK(obd) do { \
485 typecheck(struct obd_device *, obd); \
486 mutex_down(&(obd)->u.cli.cl_sem); \
487 if ((obd)->u.cli.cl_import == NULL) { \
488 mutex_up(&(obd)->u.cli.cl_sem); \
492 #define LPROCFS_CLIMP_EXIT(obd) \
493 mutex_up(&(obd)->u.cli.cl_sem);
496 /* write the name##_seq_show function, call LPROC_SEQ_FOPS_RO for read-only
497 proc entries; otherwise, you will define name##_seq_write function also for
498 a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally,
499 call lprocfs_obd_seq_create(obd, filename, 0444, &name#_fops, data); */
500 #define __LPROC_SEQ_FOPS(name, custom_seq_write) \
501 static int name##_seq_open(struct inode *inode, struct file *file) { \
502 struct proc_dir_entry *dp = PDE(inode); \
504 LPROCFS_ENTRY_AND_CHECK(dp); \
505 rc = single_open(file, name##_seq_show, dp->data); \
512 struct file_operations name##_fops = { \
513 .owner = THIS_MODULE, \
514 .open = name##_seq_open, \
516 .write = custom_seq_write, \
517 .llseek = seq_lseek, \
518 .release = lprocfs_seq_release, \
521 #define LPROC_SEQ_FOPS_RO(name) __LPROC_SEQ_FOPS(name, NULL)
522 #define LPROC_SEQ_FOPS(name) __LPROC_SEQ_FOPS(name, name##_seq_write)
524 /* lprocfs_status.c: read recovery max time bz13079 */
525 int lprocfs_obd_rd_recovery_maxtime(char *page, char **start, off_t off,
526 int count, int *eof, void *data);
528 /* lprocfs_status.c: write recovery max time bz13079 */
529 int lprocfs_obd_wr_recovery_maxtime(struct file *file, const char *buffer,
530 unsigned long count, void *data);
532 /* LPROCFS is not defined */
533 static inline void lprocfs_counter_add(struct lprocfs_stats *stats,
534 int index, long amount) { return; }
535 static inline void lprocfs_counter_incr(struct lprocfs_stats *stats,
536 int index) { return; }
537 static inline void lprocfs_counter_sub(struct lprocfs_stats *stats,
538 int index, long amount) { return; }
539 static inline void lprocfs_counter_init(struct lprocfs_stats *stats,
540 int index, unsigned conf,
541 const char *name, const char *units)
544 static inline __u64 lc_read_helper(struct lprocfs_counter *lc,
545 enum lprocfs_fields_flags field)
548 static inline struct lprocfs_stats* lprocfs_alloc_stats(unsigned int num,
549 enum lprocfs_stats_flags flags)
551 static inline void lprocfs_clear_stats(struct lprocfs_stats *stats)
553 static inline void lprocfs_free_stats(struct lprocfs_stats **stats)
555 static inline int lprocfs_register_stats(cfs_proc_dir_entry_t *root,
557 struct lprocfs_stats *stats)
559 static inline void lprocfs_init_ops_stats(int num_private_stats,
560 struct lprocfs_stats *stats)
562 static inline int lprocfs_alloc_obd_stats(struct obd_device *obddev,
563 unsigned int num_private_stats)
565 static inline void lprocfs_free_obd_stats(struct obd_device *obddev)
569 static inline int lprocfs_exp_setup(struct obd_export *exp)
571 static inline int lprocfs_exp_cleanup(struct obd_export *exp)
574 static inline cfs_proc_dir_entry_t *
575 lprocfs_register(const char *name, cfs_proc_dir_entry_t *parent,
576 struct lprocfs_vars *list, void *data) { return NULL; }
577 static inline int lprocfs_add_vars(cfs_proc_dir_entry_t *root,
578 struct lprocfs_vars *var,
579 void *data) { return 0; }
580 static inline void lprocfs_remove(cfs_proc_dir_entry_t **root) {};
581 static inline cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *head,
582 const char *name) {return 0;}
583 static inline int lprocfs_obd_setup(struct obd_device *dev,
584 struct lprocfs_vars *list) { return 0; }
585 static inline int lprocfs_obd_cleanup(struct obd_device *dev) { return 0; }
586 static inline int lprocfs_rd_u64(char *page, char **start, off_t off,
587 int count, int *eof, void *data) { return 0; }
588 static inline int lprocfs_rd_uuid(char *page, char **start, off_t off,
589 int count, int *eof, void *data) { return 0; }
590 static inline int lprocfs_rd_name(char *page, char **start, off_t off,
591 int count, int *eof, void *data) { return 0; }
592 static inline int lprocfs_rd_server_uuid(char *page, char **start, off_t off,
593 int count, int *eof, void *data)
595 static inline int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
596 int count, int *eof, void *data)
598 static inline int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
599 int count, int *eof, void *data)
601 static inline int lprocfs_rd_num_exports(char *page, char **start, off_t off,
602 int count, int *eof, void *data)
604 static inline int lprocfs_rd_numrefs(char *page, char **start, off_t off,
605 int count, int *eof, void *data)
607 static inline int lprocfs_wr_evict_client(struct file *file, const char *buffer,
608 unsigned long count, void *data)
610 static inline int lprocfs_wr_ping(struct file *file, const char *buffer,
611 unsigned long count, void *data)
617 int lprocfs_rd_blksize(char *page, char **start, off_t off,
618 int count, int *eof, void *data) { return 0; }
620 int lprocfs_rd_kbytestotal(char *page, char **start, off_t off,
621 int count, int *eof, void *data) { return 0; }
623 int lprocfs_rd_kbytesfree(char *page, char **start, off_t off,
624 int count, int *eof, void *data) { return 0; }
626 int lprocfs_rd_kbytesavail(char *page, char **start, off_t off,
627 int count, int *eof, void *data) { return 0; }
629 int lprocfs_rd_filestotal(char *page, char **start, off_t off,
630 int count, int *eof, void *data) { return 0; }
632 int lprocfs_rd_filesfree(char *page, char **start, off_t off,
633 int count, int *eof, void *data) { return 0; }
635 int lprocfs_rd_filegroups(char *page, char **start, off_t off,
636 int count, int *eof, void *data) { return 0; }
638 void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value) {}
640 void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value) {}
642 void lprocfs_oh_clear(struct obd_histogram *oh) {}
644 unsigned long lprocfs_oh_sum(struct obd_histogram *oh) { return 0; }
646 int lprocfs_counter_read(char *page, char **start, off_t off,
647 int count, int *eof, void *data) { return 0; }
649 int lprocfs_counter_write(struct file *file, const char *buffer,
650 unsigned long count, void *data) { return 0; }
653 __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx,
654 enum lprocfs_fields_flags field)
657 #define LPROCFS_ENTRY()
658 #define LPROCFS_EXIT()
659 #define LPROCFS_ENTRY_AND_CHECK(dp)
660 #define LPROC_SEQ_FOPS_RO(name)
661 #define LPROC_SEQ_FOPS(name)
665 #endif /* LPROCFS_SNMP_H */