4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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.
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).
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
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
27 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
28 * Use is subject to license terms.
30 * Copyright (c) 2011, 2012, Intel Corporation.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
36 * lustre/include/lprocfs_status.h
38 * Top level header file for LProc SNMP
40 * Author: Hariharan Thantry thantry@users.sourceforge.net
42 #ifndef _LPROCFS_SNMP_H
43 #define _LPROCFS_SNMP_H
45 #include <linux/debugfs.h>
46 #include <linux/seq_file.h>
47 #include <linux/spinlock.h>
48 #include <linux/types.h>
50 #include "lustre/lustre_idl.h"
54 struct file_operations
*fops
;
62 struct lprocfs_static_vars
{
63 struct lprocfs_vars
*obd_vars
;
64 struct attribute_group
*sysfs_vars
;
67 /* if we find more consumers this could be generalized */
68 #define OBD_HIST_MAX 32
69 struct obd_histogram
{
71 unsigned long oh_buckets
[OBD_HIST_MAX
];
93 struct obd_histogram hist
[BRW_LAST
];
97 RENAME_SAMEDIR_SIZE
= 0,
98 RENAME_CROSSDIR_SRC_SIZE
,
99 RENAME_CROSSDIR_TGT_SIZE
,
103 struct rename_stats
{
104 struct obd_histogram hist
[RENAME_LAST
];
107 /* An lprocfs counter can be configured using the enum bit masks below.
109 * LPROCFS_CNTR_EXTERNALLOCK indicates that an external lock already
110 * protects this counter from concurrent updates. If not specified,
111 * lprocfs an internal per-counter lock variable. External locks are
112 * not used to protect counter increments, but are used to protect
113 * counter readout and resets.
115 * LPROCFS_CNTR_AVGMINMAX indicates a multi-valued counter samples,
116 * (i.e. counter can be incremented by more than "1"). When specified,
117 * the counter maintains min, max and sum in addition to a simple
118 * invocation count. This allows averages to be be computed.
119 * If not specified, the counter is an increment-by-1 counter.
120 * min, max, sum, etc. are not maintained.
122 * LPROCFS_CNTR_STDDEV indicates that the counter should track sum of
123 * squares (for multi-valued counter samples only). This allows
124 * external computation of standard deviation, but involves a 64-bit
125 * multiply per counter increment.
129 LPROCFS_CNTR_EXTERNALLOCK
= 0x0001,
130 LPROCFS_CNTR_AVGMINMAX
= 0x0002,
131 LPROCFS_CNTR_STDDEV
= 0x0004,
133 /* counter data type */
134 LPROCFS_TYPE_REGS
= 0x0100,
135 LPROCFS_TYPE_BYTES
= 0x0200,
136 LPROCFS_TYPE_PAGES
= 0x0400,
137 LPROCFS_TYPE_CYCLE
= 0x0800,
140 #define LC_MIN_INIT ((~(__u64)0) >> 1)
142 struct lprocfs_counter_header
{
143 unsigned int lc_config
;
144 const char *lc_name
; /* must be static */
145 const char *lc_units
; /* must be static */
148 struct lprocfs_counter
{
154 * Every counter has lc_array_sum[0], while lc_array_sum[1] is only
155 * for irq context counter, i.e. stats with
156 * LPROCFS_STATS_FLAG_IRQ_SAFE flag, its counter need
159 __s64 lc_array_sum
[1];
161 #define lc_sum lc_array_sum[0]
162 #define lc_sum_irq lc_array_sum[1]
164 struct lprocfs_percpu
{
168 struct lprocfs_counter lp_cntr
[0];
171 #define LPROCFS_GET_NUM_CPU 0x0001
172 #define LPROCFS_GET_SMP_ID 0x0002
174 enum lprocfs_stats_flags
{
175 LPROCFS_STATS_FLAG_NONE
= 0x0000, /* per cpu counter */
176 LPROCFS_STATS_FLAG_NOPERCPU
= 0x0001, /* stats have no percpu
177 * area and need locking */
178 LPROCFS_STATS_FLAG_IRQ_SAFE
= 0x0002, /* alloc need irq safe */
181 enum lprocfs_fields_flags
{
182 LPROCFS_FIELDS_FLAGS_CONFIG
= 0x0001,
183 LPROCFS_FIELDS_FLAGS_SUM
= 0x0002,
184 LPROCFS_FIELDS_FLAGS_MIN
= 0x0003,
185 LPROCFS_FIELDS_FLAGS_MAX
= 0x0004,
186 LPROCFS_FIELDS_FLAGS_AVG
= 0x0005,
187 LPROCFS_FIELDS_FLAGS_SUMSQUARE
= 0x0006,
188 LPROCFS_FIELDS_FLAGS_COUNT
= 0x0007,
191 struct lprocfs_stats
{
193 unsigned short ls_num
;
194 /* 1 + the biggest cpu # whose ls_percpu slot has been allocated */
195 unsigned short ls_biggest_alloc_num
;
196 enum lprocfs_stats_flags ls_flags
;
197 /* Lock used when there are no percpu stats areas; For percpu stats,
198 * it is used to protect ls_biggest_alloc_num change */
201 /* has ls_num of counter headers */
202 struct lprocfs_counter_header
*ls_cnt_header
;
203 struct lprocfs_percpu
*ls_percpu
[0];
206 #define OPC_RANGE(seg) (seg ## _LAST_OPC - seg ## _FIRST_OPC)
208 /* Pack all opcodes down into a single monotonically increasing index */
209 static inline int opcode_offset(__u32 opc
) {
210 if (opc
< OST_LAST_OPC
) {
212 return (opc
- OST_FIRST_OPC
);
213 } else if (opc
< MDS_LAST_OPC
) {
215 return (opc
- MDS_FIRST_OPC
+
217 } else if (opc
< LDLM_LAST_OPC
) {
219 return (opc
- LDLM_FIRST_OPC
+
222 } else if (opc
< MGS_LAST_OPC
) {
224 return (opc
- MGS_FIRST_OPC
+
228 } else if (opc
< OBD_LAST_OPC
) {
230 return (opc
- OBD_FIRST_OPC
+
235 } else if (opc
< LLOG_LAST_OPC
) {
237 return (opc
- LLOG_FIRST_OPC
+
243 } else if (opc
< QUOTA_LAST_OPC
) {
245 return (opc
- QUOTA_FIRST_OPC
+
252 } else if (opc
< SEQ_LAST_OPC
) {
254 return (opc
- SEQ_FIRST_OPC
+
262 } else if (opc
< SEC_LAST_OPC
) {
264 return (opc
- SEC_FIRST_OPC
+
273 } else if (opc
< FLD_LAST_OPC
) {
275 return (opc
- FLD_FIRST_OPC
+
285 } else if (opc
< UPDATE_LAST_OPC
) {
287 return (opc
- UPDATE_FIRST_OPC
+
305 #define LUSTRE_MAX_OPCODES (OPC_RANGE(OST) + \
317 #define EXTRA_MAX_OPCODES ((PTLRPC_LAST_CNTR - PTLRPC_FIRST_CNTR) + \
321 PTLRPC_REQWAIT_CNTR
= 0,
322 PTLRPC_REQQDEPTH_CNTR
,
323 PTLRPC_REQACTIVE_CNTR
,
325 PTLRPC_REQBUF_AVAIL_CNTR
,
329 #define PTLRPC_FIRST_CNTR PTLRPC_REQWAIT_CNTR
332 LDLM_GLIMPSE_ENQUEUE
= 0,
349 #define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE
351 extern struct dentry
*debugfs_lustre_root
;
352 extern struct kobject
*lustre_kobj
;
355 struct obd_histogram
;
357 /* Days / hours / mins / seconds format */
361 static inline void s2dhms(struct dhms
*ts
, time_t secs
)
363 ts
->d
= secs
/ 86400;
370 #define DHMS_FMT "%dd%dh%02dm%02ds"
371 #define DHMS_VARS(x) (x)->d, (x)->h, (x)->m, (x)->s
373 #define JOBSTATS_JOBID_VAR_MAX_LEN 20
374 #define JOBSTATS_DISABLE "disable"
375 #define JOBSTATS_PROCNAME_UID "procname_uid"
376 #define JOBSTATS_NODELOCAL "nodelocal"
378 extern int lprocfs_write_frac_helper(const char __user
*buffer
,
379 unsigned long count
, int *val
, int mult
);
380 extern int lprocfs_read_frac_helper(char *buffer
, unsigned long count
,
382 extern int lprocfs_stats_alloc_one(struct lprocfs_stats
*stats
,
386 * < 0 : on error (only possible for opc as LPROCFS_GET_SMP_ID)
388 static inline int lprocfs_stats_lock(struct lprocfs_stats
*stats
, int opc
,
389 unsigned long *flags
)
397 case LPROCFS_GET_SMP_ID
:
398 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_NOPERCPU
) {
399 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_IRQ_SAFE
)
400 spin_lock_irqsave(&stats
->ls_lock
, *flags
);
402 spin_lock(&stats
->ls_lock
);
405 unsigned int cpuid
= get_cpu();
407 if (unlikely(stats
->ls_percpu
[cpuid
] == NULL
)) {
408 rc
= lprocfs_stats_alloc_one(stats
, cpuid
);
417 case LPROCFS_GET_NUM_CPU
:
418 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_NOPERCPU
) {
419 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_IRQ_SAFE
)
420 spin_lock_irqsave(&stats
->ls_lock
, *flags
);
422 spin_lock(&stats
->ls_lock
);
425 return stats
->ls_biggest_alloc_num
;
429 static inline void lprocfs_stats_unlock(struct lprocfs_stats
*stats
, int opc
,
430 unsigned long *flags
)
436 case LPROCFS_GET_SMP_ID
:
437 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_NOPERCPU
) {
438 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_IRQ_SAFE
) {
439 spin_unlock_irqrestore(&stats
->ls_lock
,
442 spin_unlock(&stats
->ls_lock
);
449 case LPROCFS_GET_NUM_CPU
:
450 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_NOPERCPU
) {
451 if (stats
->ls_flags
& LPROCFS_STATS_FLAG_IRQ_SAFE
) {
452 spin_unlock_irqrestore(&stats
->ls_lock
,
455 spin_unlock(&stats
->ls_lock
);
462 static inline unsigned int
463 lprocfs_stats_counter_size(struct lprocfs_stats
*stats
)
465 unsigned int percpusize
;
467 percpusize
= offsetof(struct lprocfs_percpu
, lp_cntr
[stats
->ls_num
]);
469 /* irq safe stats need lc_array_sum[1] */
470 if ((stats
->ls_flags
& LPROCFS_STATS_FLAG_IRQ_SAFE
) != 0)
471 percpusize
+= stats
->ls_num
* sizeof(__s64
);
473 if ((stats
->ls_flags
& LPROCFS_STATS_FLAG_NOPERCPU
) == 0)
474 percpusize
= L1_CACHE_ALIGN(percpusize
);
479 static inline struct lprocfs_counter
*
480 lprocfs_stats_counter_get(struct lprocfs_stats
*stats
, unsigned int cpuid
,
483 struct lprocfs_counter
*cntr
;
485 cntr
= &stats
->ls_percpu
[cpuid
]->lp_cntr
[index
];
487 if ((stats
->ls_flags
& LPROCFS_STATS_FLAG_IRQ_SAFE
) != 0)
488 cntr
= (void *)cntr
+ index
* sizeof(__s64
);
493 /* Two optimized LPROCFS counter increment functions are provided:
494 * lprocfs_counter_incr(cntr, value) - optimized for by-one counters
495 * lprocfs_counter_add(cntr) - use for multi-valued counters
496 * Counter data layout allows config flag, counter lock and the
497 * count itself to reside within a single cache line.
500 extern void lprocfs_counter_add(struct lprocfs_stats
*stats
, int idx
,
502 extern void lprocfs_counter_sub(struct lprocfs_stats
*stats
, int idx
,
505 #define lprocfs_counter_incr(stats, idx) \
506 lprocfs_counter_add(stats, idx, 1)
507 #define lprocfs_counter_decr(stats, idx) \
508 lprocfs_counter_sub(stats, idx, 1)
510 extern __s64
lprocfs_read_helper(struct lprocfs_counter
*lc
,
511 struct lprocfs_counter_header
*header
,
512 enum lprocfs_stats_flags flags
,
513 enum lprocfs_fields_flags field
);
514 static inline __u64
lprocfs_stats_collector(struct lprocfs_stats
*stats
,
516 enum lprocfs_fields_flags field
)
519 unsigned int num_cpu
;
520 unsigned long flags
= 0;
523 LASSERT(stats
!= NULL
);
525 num_cpu
= lprocfs_stats_lock(stats
, LPROCFS_GET_NUM_CPU
, &flags
);
526 for (i
= 0; i
< num_cpu
; i
++) {
527 if (stats
->ls_percpu
[i
] == NULL
)
529 ret
+= lprocfs_read_helper(
530 lprocfs_stats_counter_get(stats
, i
, idx
),
531 &stats
->ls_cnt_header
[idx
], stats
->ls_flags
,
534 lprocfs_stats_unlock(stats
, LPROCFS_GET_NUM_CPU
, &flags
);
538 extern struct lprocfs_stats
*
539 lprocfs_alloc_stats(unsigned int num
, enum lprocfs_stats_flags flags
);
540 extern void lprocfs_clear_stats(struct lprocfs_stats
*stats
);
541 extern void lprocfs_free_stats(struct lprocfs_stats
**stats
);
542 extern void lprocfs_init_ops_stats(int num_private_stats
,
543 struct lprocfs_stats
*stats
);
544 extern void lprocfs_init_mps_stats(int num_private_stats
,
545 struct lprocfs_stats
*stats
);
546 extern void lprocfs_init_ldlm_stats(struct lprocfs_stats
*ldlm_stats
);
547 extern int lprocfs_alloc_obd_stats(struct obd_device
*obddev
,
548 unsigned int num_private_stats
);
549 extern int lprocfs_alloc_md_stats(struct obd_device
*obddev
,
550 unsigned int num_private_stats
);
551 extern void lprocfs_counter_init(struct lprocfs_stats
*stats
, int index
,
552 unsigned conf
, const char *name
,
554 extern void lprocfs_free_obd_stats(struct obd_device
*obddev
);
555 extern void lprocfs_free_md_stats(struct obd_device
*obddev
);
557 extern int lprocfs_exp_cleanup(struct obd_export
*exp
);
558 extern struct dentry
*ldebugfs_add_simple(struct dentry
*root
,
561 struct file_operations
*fops
);
562 extern struct dentry
*
563 ldebugfs_add_symlink(const char *name
, struct dentry
*parent
,
564 const char *format
, ...);
566 extern int ldebugfs_register_stats(struct dentry
*parent
,
568 struct lprocfs_stats
*stats
);
570 /* lprocfs_status.c */
571 extern int ldebugfs_add_vars(struct dentry
*parent
,
572 struct lprocfs_vars
*var
,
575 extern struct dentry
*ldebugfs_register(const char *name
,
576 struct dentry
*parent
,
577 struct lprocfs_vars
*list
,
580 extern void ldebugfs_remove(struct dentry
**entryp
);
582 extern int lprocfs_obd_setup(struct obd_device
*obd
, struct lprocfs_vars
*list
,
583 struct attribute_group
*attrs
);
584 extern int lprocfs_obd_cleanup(struct obd_device
*obd
);
586 extern int ldebugfs_seq_create(struct dentry
*parent
,
589 const struct file_operations
*seq_fops
,
591 extern int ldebugfs_obd_seq_create(struct obd_device
*dev
,
594 const struct file_operations
*seq_fops
,
597 /* Generic callbacks */
599 extern int lprocfs_rd_u64(struct seq_file
*m
, void *data
);
600 extern int lprocfs_rd_atomic(struct seq_file
*m
, void *data
);
601 extern int lprocfs_wr_atomic(struct file
*file
, const char __user
*buffer
,
602 unsigned long count
, void *data
);
603 extern int lprocfs_rd_uint(struct seq_file
*m
, void *data
);
604 extern int lprocfs_wr_uint(struct file
*file
, const char __user
*buffer
,
605 unsigned long count
, void *data
);
606 extern int lprocfs_rd_name(struct seq_file
*m
, void *data
);
607 extern int lprocfs_rd_server_uuid(struct seq_file
*m
, void *data
);
608 extern int lprocfs_rd_conn_uuid(struct seq_file
*m
, void *data
);
609 extern int lprocfs_rd_import(struct seq_file
*m
, void *data
);
610 extern int lprocfs_rd_state(struct seq_file
*m
, void *data
);
611 extern int lprocfs_rd_connect_flags(struct seq_file
*m
, void *data
);
613 struct adaptive_timeout
;
614 extern int lprocfs_at_hist_helper(struct seq_file
*m
,
615 struct adaptive_timeout
*at
);
616 extern int lprocfs_rd_timeouts(struct seq_file
*m
, void *data
);
617 extern int lprocfs_wr_timeouts(struct file
*file
, const char __user
*buffer
,
618 unsigned long count
, void *data
);
619 extern int lprocfs_wr_evict_client(struct file
*file
, const char __user
*buffer
,
620 size_t count
, loff_t
*off
);
621 extern int lprocfs_wr_ping(struct file
*file
, const char __user
*buffer
,
622 size_t count
, loff_t
*off
);
623 extern int lprocfs_wr_import(struct file
*file
, const char __user
*buffer
,
624 size_t count
, loff_t
*off
);
625 extern int lprocfs_rd_pinger_recov(struct seq_file
*m
, void *n
);
626 extern int lprocfs_wr_pinger_recov(struct file
*file
, const char __user
*buffer
,
627 size_t count
, loff_t
*off
);
631 extern int lprocfs_write_helper(const char __user
*buffer
, unsigned long count
,
633 extern int lprocfs_seq_read_frac_helper(struct seq_file
*m
, long val
, int mult
);
634 extern int lprocfs_write_u64_helper(const char __user
*buffer
,
635 unsigned long count
, __u64
*val
);
636 extern int lprocfs_write_frac_u64_helper(const char *buffer
,
638 __u64
*val
, int mult
);
639 extern char *lprocfs_find_named_value(const char *buffer
, const char *name
,
641 void lprocfs_oh_tally(struct obd_histogram
*oh
, unsigned int value
);
642 void lprocfs_oh_tally_log2(struct obd_histogram
*oh
, unsigned int value
);
643 void lprocfs_oh_clear(struct obd_histogram
*oh
);
644 unsigned long lprocfs_oh_sum(struct obd_histogram
*oh
);
646 void lprocfs_stats_collect(struct lprocfs_stats
*stats
, int idx
,
647 struct lprocfs_counter
*cnt
);
649 extern int lprocfs_single_release(struct inode
*, struct file
*);
650 extern int lprocfs_seq_release(struct inode
*, struct file
*);
652 /* You must use these macros when you want to refer to
653 * the import in a client obd_device for a lprocfs entry */
654 #define LPROCFS_CLIMP_CHECK(obd) do { \
655 typecheck(struct obd_device *, obd); \
656 down_read(&(obd)->u.cli.cl_sem); \
657 if ((obd)->u.cli.cl_import == NULL) { \
658 up_read(&(obd)->u.cli.cl_sem); \
662 #define LPROCFS_CLIMP_EXIT(obd) \
663 up_read(&(obd)->u.cli.cl_sem)
666 /* write the name##_seq_show function, call LPROC_SEQ_FOPS_RO for read-only
667 proc entries; otherwise, you will define name##_seq_write function also for
668 a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally,
669 call ldebugfs_obd_seq_create(obd, filename, 0444, &name#_fops, data); */
670 #define __LPROC_SEQ_FOPS(name, custom_seq_write) \
671 static int name##_single_open(struct inode *inode, struct file *file) \
673 return single_open(file, name##_seq_show, inode->i_private); \
675 static struct file_operations name##_fops = { \
676 .owner = THIS_MODULE, \
677 .open = name##_single_open, \
679 .write = custom_seq_write, \
680 .llseek = seq_lseek, \
681 .release = lprocfs_single_release, \
684 #define LPROC_SEQ_FOPS_RO(name) __LPROC_SEQ_FOPS(name, NULL)
685 #define LPROC_SEQ_FOPS(name) __LPROC_SEQ_FOPS(name, name##_seq_write)
687 #define LPROC_SEQ_FOPS_RO_TYPE(name, type) \
688 static int name##_##type##_seq_show(struct seq_file *m, void *v)\
690 return lprocfs_rd_##type(m, m->private); \
692 LPROC_SEQ_FOPS_RO(name##_##type)
694 #define LPROC_SEQ_FOPS_RW_TYPE(name, type) \
695 static int name##_##type##_seq_show(struct seq_file *m, void *v)\
697 return lprocfs_rd_##type(m, m->private); \
699 static ssize_t name##_##type##_seq_write(struct file *file, \
700 const char __user *buffer, size_t count, \
703 struct seq_file *seq = file->private_data; \
704 return lprocfs_wr_##type(file, buffer, \
705 count, seq->private); \
707 LPROC_SEQ_FOPS(name##_##type)
709 #define LPROC_SEQ_FOPS_WR_ONLY(name, type) \
710 static ssize_t name##_##type##_write(struct file *file, \
711 const char __user *buffer, size_t count, \
714 return lprocfs_wr_##type(file, buffer, count, off); \
716 static int name##_##type##_open(struct inode *inode, struct file *file) \
718 return single_open(file, NULL, inode->i_private); \
720 static struct file_operations name##_##type##_fops = { \
721 .open = name##_##type##_open, \
722 .write = name##_##type##_write, \
723 .release = lprocfs_single_release, \
727 struct attribute attr
;
728 ssize_t (*show
)(struct kobject
*kobj
, struct attribute
*attr
,
730 ssize_t (*store
)(struct kobject
*kobj
, struct attribute
*attr
,
731 const char *buf
, size_t len
);
734 #define LUSTRE_ATTR(name, mode, show, store) \
735 static struct lustre_attr lustre_attr_##name = __ATTR(name, mode, show, store)
737 #define LUSTRE_RO_ATTR(name) LUSTRE_ATTR(name, 0444, name##_show, NULL)
738 #define LUSTRE_RW_ATTR(name) LUSTRE_ATTR(name, 0644, name##_show, name##_store)
740 ssize_t
lustre_attr_show(struct kobject
*kobj
, struct attribute
*attr
,
742 ssize_t
lustre_attr_store(struct kobject
*kobj
, struct attribute
*attr
,
743 const char *buf
, size_t len
);
745 extern const struct sysfs_ops lustre_sysfs_ops
;
748 struct ptlrpc_request
;
749 extern void target_print_req(void *seq_file
, struct ptlrpc_request
*req
);
752 int lprocfs_obd_rd_max_pages_per_rpc(struct seq_file
*m
, void *data
);
753 int lprocfs_obd_wr_max_pages_per_rpc(struct file
*file
, const char *buffer
,
754 size_t count
, loff_t
*off
);
756 /* all quota proc functions */
757 extern int lprocfs_quota_rd_bunit(char *page
, char **start
,
758 loff_t off
, int count
,
759 int *eof
, void *data
);
760 extern int lprocfs_quota_wr_bunit(struct file
*file
, const char *buffer
,
761 unsigned long count
, void *data
);
762 extern int lprocfs_quota_rd_btune(char *page
, char **start
,
763 loff_t off
, int count
,
764 int *eof
, void *data
);
765 extern int lprocfs_quota_wr_btune(struct file
*file
, const char *buffer
,
766 unsigned long count
, void *data
);
767 extern int lprocfs_quota_rd_iunit(char *page
, char **start
,
768 loff_t off
, int count
,
769 int *eof
, void *data
);
770 extern int lprocfs_quota_wr_iunit(struct file
*file
, const char *buffer
,
771 unsigned long count
, void *data
);
772 extern int lprocfs_quota_rd_itune(char *page
, char **start
,
773 loff_t off
, int count
,
774 int *eof
, void *data
);
775 extern int lprocfs_quota_wr_itune(struct file
*file
, const char *buffer
,
776 unsigned long count
, void *data
);
777 extern int lprocfs_quota_rd_type(char *page
, char **start
, loff_t off
, int count
,
778 int *eof
, void *data
);
779 extern int lprocfs_quota_wr_type(struct file
*file
, const char *buffer
,
780 unsigned long count
, void *data
);
781 extern int lprocfs_quota_rd_switch_seconds(char *page
, char **start
, loff_t off
,
782 int count
, int *eof
, void *data
);
783 extern int lprocfs_quota_wr_switch_seconds(struct file
*file
,
785 unsigned long count
, void *data
);
786 extern int lprocfs_quota_rd_sync_blk(char *page
, char **start
, loff_t off
,
787 int count
, int *eof
, void *data
);
788 extern int lprocfs_quota_wr_sync_blk(struct file
*file
, const char *buffer
,
789 unsigned long count
, void *data
);
790 extern int lprocfs_quota_rd_switch_qs(char *page
, char **start
, loff_t off
,
791 int count
, int *eof
, void *data
);
792 extern int lprocfs_quota_wr_switch_qs(struct file
*file
,
794 unsigned long count
, void *data
);
795 extern int lprocfs_quota_rd_boundary_factor(char *page
, char **start
, loff_t off
,
796 int count
, int *eof
, void *data
);
797 extern int lprocfs_quota_wr_boundary_factor(struct file
*file
,
799 unsigned long count
, void *data
);
800 extern int lprocfs_quota_rd_least_bunit(char *page
, char **start
, loff_t off
,
801 int count
, int *eof
, void *data
);
802 extern int lprocfs_quota_wr_least_bunit(struct file
*file
,
804 unsigned long count
, void *data
);
805 extern int lprocfs_quota_rd_least_iunit(char *page
, char **start
, loff_t off
,
806 int count
, int *eof
, void *data
);
807 extern int lprocfs_quota_wr_least_iunit(struct file
*file
,
809 unsigned long count
, void *data
);
810 extern int lprocfs_quota_rd_qs_factor(char *page
, char **start
, loff_t off
,
811 int count
, int *eof
, void *data
);
812 extern int lprocfs_quota_wr_qs_factor(struct file
*file
,
814 unsigned long count
, void *data
);
815 #endif /* LPROCFS_SNMP_H */