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.gnu.org/licenses/gpl-2.0.html
23 * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Use is subject to license terms.
26 * Copyright (c) 2011, 2016, Intel Corporation.
29 * This file is part of Lustre, http://www.lustre.org/
30 * Lustre is a trademark of Sun Microsystems, Inc.
32 #define DEBUG_SUBSYSTEM S_CLASS
34 #include <linux/version.h>
35 #include <asm/statfs.h>
36 #include <obd_cksum.h>
37 #include <obd_class.h>
38 #include <lprocfs_status.h>
39 #include <linux/seq_file.h>
40 #include <lustre_osc.h>
42 #include "osc_internal.h"
45 static int osc_active_seq_show(struct seq_file *m, void *v)
47 struct obd_device *dev = m->private;
49 LPROCFS_CLIMP_CHECK(dev);
50 seq_printf(m, "%d\n", !dev->u.cli.cl_import->imp_deactive);
51 LPROCFS_CLIMP_EXIT(dev);
55 static ssize_t osc_active_seq_write(struct file *file,
56 const char __user *buffer,
57 size_t count, loff_t *off)
59 struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
63 rc = lprocfs_str_to_s64(buffer, count, &val);
66 if (val < 0 || val > 1)
70 if (dev->u.cli.cl_import->imp_deactive == val)
71 rc = ptlrpc_set_import_active(dev->u.cli.cl_import, val);
73 CDEBUG(D_CONFIG, "activate %d: ignoring repeat request\n",
78 LPROC_SEQ_FOPS(osc_active);
80 static int osc_max_rpcs_in_flight_seq_show(struct seq_file *m, void *v)
82 struct obd_device *dev = m->private;
83 struct client_obd *cli = &dev->u.cli;
85 spin_lock(&cli->cl_loi_list_lock);
86 seq_printf(m, "%u\n", cli->cl_max_rpcs_in_flight);
87 spin_unlock(&cli->cl_loi_list_lock);
91 static ssize_t osc_max_rpcs_in_flight_seq_write(struct file *file,
92 const char __user *buffer,
93 size_t count, loff_t *off)
95 struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
96 struct client_obd *cli = &dev->u.cli;
98 int adding, added, req_count;
101 rc = lprocfs_str_to_s64(buffer, count, &val);
104 if (val < 1 || val > OSC_MAX_RIF_MAX)
107 LPROCFS_CLIMP_CHECK(dev);
109 adding = (int)val - cli->cl_max_rpcs_in_flight;
110 req_count = atomic_read(&osc_pool_req_count);
111 if (adding > 0 && req_count < osc_reqpool_maxreqcount) {
113 * There might be some race which will cause over-limit
114 * allocation, but it is fine.
116 if (req_count + adding > osc_reqpool_maxreqcount)
117 adding = osc_reqpool_maxreqcount - req_count;
119 added = osc_rq_pool->prp_populate(osc_rq_pool, adding);
120 atomic_add(added, &osc_pool_req_count);
123 spin_lock(&cli->cl_loi_list_lock);
124 cli->cl_max_rpcs_in_flight = val;
125 client_adjust_max_dirty(cli);
126 spin_unlock(&cli->cl_loi_list_lock);
128 LPROCFS_CLIMP_EXIT(dev);
131 LPROC_SEQ_FOPS(osc_max_rpcs_in_flight);
133 static int osc_max_dirty_mb_seq_show(struct seq_file *m, void *v)
135 struct obd_device *dev = m->private;
136 struct client_obd *cli = &dev->u.cli;
140 spin_lock(&cli->cl_loi_list_lock);
141 val = cli->cl_dirty_max_pages;
142 spin_unlock(&cli->cl_loi_list_lock);
144 mult = 1 << (20 - PAGE_SHIFT);
145 return lprocfs_seq_read_frac_helper(m, val, mult);
148 static ssize_t osc_max_dirty_mb_seq_write(struct file *file,
149 const char __user *buffer,
150 size_t count, loff_t *off)
152 struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
153 struct client_obd *cli = &dev->u.cli;
157 rc = lprocfs_str_with_units_to_s64(buffer, count, &pages_number, 'M');
161 pages_number >>= PAGE_SHIFT;
163 if (pages_number <= 0 ||
164 pages_number >= OSC_MAX_DIRTY_MB_MAX << (20 - PAGE_SHIFT) ||
165 pages_number > totalram_pages / 4) /* 1/4 of RAM */
168 spin_lock(&cli->cl_loi_list_lock);
169 cli->cl_dirty_max_pages = pages_number;
170 osc_wake_cache_waiters(cli);
171 spin_unlock(&cli->cl_loi_list_lock);
175 LPROC_SEQ_FOPS(osc_max_dirty_mb);
177 static int osc_cached_mb_seq_show(struct seq_file *m, void *v)
179 struct obd_device *dev = m->private;
180 struct client_obd *cli = &dev->u.cli;
181 int shift = 20 - PAGE_SHIFT;
183 seq_printf(m, "used_mb: %ld\n"
186 (atomic_long_read(&cli->cl_lru_in_list) +
187 atomic_long_read(&cli->cl_lru_busy)) >> shift,
188 atomic_long_read(&cli->cl_lru_busy),
189 cli->cl_lru_reclaim);
194 /* shrink the number of caching pages to a specific number */
196 osc_cached_mb_seq_write(struct file *file, const char __user *buffer,
197 size_t count, loff_t *off)
199 struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
200 struct client_obd *cli = &dev->u.cli;
205 if (count >= sizeof(kernbuf))
208 if (copy_from_user(kernbuf, buffer, count))
212 buffer += lprocfs_find_named_value(kernbuf, "used_mb:", &count) -
214 rc = lprocfs_str_with_units_to_s64(buffer, count, &pages_number, 'M');
218 pages_number >>= PAGE_SHIFT;
220 if (pages_number < 0)
223 rc = atomic_long_read(&cli->cl_lru_in_list) - pages_number;
228 env = cl_env_get(&refcheck);
230 (void)osc_lru_shrink(env, cli, rc, true);
231 cl_env_put(env, &refcheck);
237 LPROC_SEQ_FOPS(osc_cached_mb);
239 static int osc_cur_dirty_bytes_seq_show(struct seq_file *m, void *v)
241 struct obd_device *dev = m->private;
242 struct client_obd *cli = &dev->u.cli;
244 spin_lock(&cli->cl_loi_list_lock);
245 seq_printf(m, "%lu\n", cli->cl_dirty_pages << PAGE_SHIFT);
246 spin_unlock(&cli->cl_loi_list_lock);
249 LPROC_SEQ_FOPS_RO(osc_cur_dirty_bytes);
251 static int osc_cur_grant_bytes_seq_show(struct seq_file *m, void *v)
253 struct obd_device *dev = m->private;
254 struct client_obd *cli = &dev->u.cli;
256 spin_lock(&cli->cl_loi_list_lock);
257 seq_printf(m, "%lu\n", cli->cl_avail_grant);
258 spin_unlock(&cli->cl_loi_list_lock);
262 static ssize_t osc_cur_grant_bytes_seq_write(struct file *file,
263 const char __user *buffer,
264 size_t count, loff_t *off)
266 struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
267 struct client_obd *cli = &obd->u.cli;
274 rc = lprocfs_str_with_units_to_s64(buffer, count, &val, '1');
280 /* this is only for shrinking grant */
281 spin_lock(&cli->cl_loi_list_lock);
282 if (val >= cli->cl_avail_grant) {
283 spin_unlock(&cli->cl_loi_list_lock);
287 spin_unlock(&cli->cl_loi_list_lock);
289 LPROCFS_CLIMP_CHECK(obd);
290 if (cli->cl_import->imp_state == LUSTRE_IMP_FULL)
291 rc = osc_shrink_grant_to_target(cli, val);
292 LPROCFS_CLIMP_EXIT(obd);
297 LPROC_SEQ_FOPS(osc_cur_grant_bytes);
299 static int osc_cur_lost_grant_bytes_seq_show(struct seq_file *m, void *v)
301 struct obd_device *dev = m->private;
302 struct client_obd *cli = &dev->u.cli;
304 spin_lock(&cli->cl_loi_list_lock);
305 seq_printf(m, "%lu\n", cli->cl_lost_grant);
306 spin_unlock(&cli->cl_loi_list_lock);
309 LPROC_SEQ_FOPS_RO(osc_cur_lost_grant_bytes);
311 static int osc_cur_dirty_grant_bytes_seq_show(struct seq_file *m, void *v)
313 struct obd_device *dev = m->private;
314 struct client_obd *cli = &dev->u.cli;
316 spin_lock(&cli->cl_loi_list_lock);
317 seq_printf(m, "%lu\n", cli->cl_dirty_grant);
318 spin_unlock(&cli->cl_loi_list_lock);
321 LPROC_SEQ_FOPS_RO(osc_cur_dirty_grant_bytes);
323 static int osc_grant_shrink_interval_seq_show(struct seq_file *m, void *v)
325 struct obd_device *obd = m->private;
329 seq_printf(m, "%lld\n",
330 obd->u.cli.cl_grant_shrink_interval);
334 static ssize_t osc_grant_shrink_interval_seq_write(struct file *file,
335 const char __user *buffer,
336 size_t count, loff_t *off)
338 struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
345 rc = lprocfs_str_to_s64(buffer, count, &val);
349 if (val <= 0 || val > INT_MAX)
352 obd->u.cli.cl_grant_shrink_interval = val;
356 LPROC_SEQ_FOPS(osc_grant_shrink_interval);
358 static int osc_checksum_seq_show(struct seq_file *m, void *v)
360 struct obd_device *obd = m->private;
365 seq_printf(m, "%d\n", obd->u.cli.cl_checksum ? 1 : 0);
369 static ssize_t osc_checksum_seq_write(struct file *file,
370 const char __user *buffer,
371 size_t count, loff_t *off)
373 struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
380 rc = lprocfs_str_to_s64(buffer, count, &val);
384 obd->u.cli.cl_checksum = !!val;
388 LPROC_SEQ_FOPS(osc_checksum);
390 static int osc_checksum_type_seq_show(struct seq_file *m, void *v)
392 struct obd_device *obd = m->private;
399 for (i = 0; i < ARRAY_SIZE(cksum_name); i++) {
400 if (((1 << i) & obd->u.cli.cl_supp_cksum_types) == 0)
402 if (obd->u.cli.cl_cksum_type == (1 << i))
403 seq_printf(m, "[%s] ", cksum_name[i]);
405 seq_printf(m, "%s ", cksum_name[i]);
411 static ssize_t osc_checksum_type_seq_write(struct file *file,
412 const char __user *buffer,
413 size_t count, loff_t *off)
415 struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
423 if (count > sizeof(kernbuf) - 1)
425 if (copy_from_user(kernbuf, buffer, count))
427 if (count > 0 && kernbuf[count - 1] == '\n')
428 kernbuf[count - 1] = '\0';
430 kernbuf[count] = '\0';
432 for (i = 0; i < ARRAY_SIZE(cksum_name); i++) {
433 if (((1 << i) & obd->u.cli.cl_supp_cksum_types) == 0)
435 if (!strcmp(kernbuf, cksum_name[i])) {
436 obd->u.cli.cl_cksum_type = 1 << i;
442 LPROC_SEQ_FOPS(osc_checksum_type);
444 static int osc_resend_count_seq_show(struct seq_file *m, void *v)
446 struct obd_device *obd = m->private;
448 seq_printf(m, "%u\n", atomic_read(&obd->u.cli.cl_resends));
452 static ssize_t osc_resend_count_seq_write(struct file *file,
453 const char __user *buffer,
454 size_t count, loff_t *off)
456 struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
460 rc = lprocfs_str_to_s64(buffer, count, &val);
464 if (val < 0 || val > INT_MAX)
467 atomic_set(&obd->u.cli.cl_resends, val);
471 LPROC_SEQ_FOPS(osc_resend_count);
473 static int osc_checksum_dump_seq_show(struct seq_file *m, void *v)
475 struct obd_device *obd = m->private;
480 seq_printf(m, "%d\n", obd->u.cli.cl_checksum_dump ? 1 : 0);
484 static ssize_t osc_checksum_dump_seq_write(struct file *file,
485 const char __user *buffer,
486 size_t count, loff_t *off)
488 struct obd_device *obd;
492 obd = ((struct seq_file *)file->private_data)->private;
496 rc = lprocfs_str_to_s64(buffer, count, &val);
500 obd->u.cli.cl_checksum_dump = (val ? 1 : 0);
504 LPROC_SEQ_FOPS(osc_checksum_dump);
506 static int osc_contention_seconds_seq_show(struct seq_file *m, void *v)
508 struct obd_device *obd = m->private;
509 struct osc_device *od = obd2osc_dev(obd);
511 seq_printf(m, "%u\n", od->od_contention_time);
515 static ssize_t osc_contention_seconds_seq_write(struct file *file,
516 const char __user *buffer,
517 size_t count, loff_t *off)
519 struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
520 struct osc_device *od = obd2osc_dev(obd);
524 rc = lprocfs_str_to_s64(buffer, count, &val);
527 if (val < 0 || val > INT_MAX)
530 od->od_contention_time = val;
534 LPROC_SEQ_FOPS(osc_contention_seconds);
536 static int osc_lockless_truncate_seq_show(struct seq_file *m, void *v)
538 struct obd_device *obd = m->private;
539 struct osc_device *od = obd2osc_dev(obd);
541 seq_printf(m, "%u\n", od->od_lockless_truncate);
545 static ssize_t osc_lockless_truncate_seq_write(struct file *file,
546 const char __user *buffer,
547 size_t count, loff_t *off)
549 struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
550 struct osc_device *od = obd2osc_dev(obd);
554 rc = lprocfs_str_to_s64(buffer, count, &val);
560 od->od_lockless_truncate = !!val;
564 LPROC_SEQ_FOPS(osc_lockless_truncate);
566 static int osc_destroys_in_flight_seq_show(struct seq_file *m, void *v)
568 struct obd_device *obd = m->private;
569 seq_printf(m, "%u\n",
570 atomic_read(&obd->u.cli.cl_destroy_in_flight));
573 LPROC_SEQ_FOPS_RO(osc_destroys_in_flight);
575 LPROC_SEQ_FOPS_RW_TYPE(osc, obd_max_pages_per_rpc);
577 static int osc_unstable_stats_seq_show(struct seq_file *m, void *v)
579 struct obd_device *dev = m->private;
580 struct client_obd *cli = &dev->u.cli;
584 pages = atomic_long_read(&cli->cl_unstable_count);
585 mb = (pages * PAGE_SIZE) >> 20;
587 seq_printf(m, "unstable_pages: %20ld\n"
588 "unstable_mb: %10d\n",
592 LPROC_SEQ_FOPS_RO(osc_unstable_stats);
594 LPROC_SEQ_FOPS_RO_TYPE(osc, connect_flags);
595 LPROC_SEQ_FOPS_RO_TYPE(osc, server_uuid);
596 LPROC_SEQ_FOPS_RO_TYPE(osc, conn_uuid);
597 LPROC_SEQ_FOPS_RO_TYPE(osc, timeouts);
598 LPROC_SEQ_FOPS_RO_TYPE(osc, state);
600 LPROC_SEQ_FOPS_WR_ONLY(osc, ping);
602 LPROC_SEQ_FOPS_RW_TYPE(osc, import);
603 LPROC_SEQ_FOPS_RW_TYPE(osc, pinger_recov);
605 struct lprocfs_vars lprocfs_osc_obd_vars[] = {
607 .fops = &osc_ping_fops,
609 { .name = "connect_flags",
610 .fops = &osc_connect_flags_fops },
611 { .name = "ost_server_uuid",
612 .fops = &osc_server_uuid_fops },
613 { .name = "ost_conn_uuid",
614 .fops = &osc_conn_uuid_fops },
616 .fops = &osc_active_fops },
617 { .name = "max_pages_per_rpc",
618 .fops = &osc_obd_max_pages_per_rpc_fops },
619 { .name = "max_rpcs_in_flight",
620 .fops = &osc_max_rpcs_in_flight_fops },
621 { .name = "destroys_in_flight",
622 .fops = &osc_destroys_in_flight_fops },
623 { .name = "max_dirty_mb",
624 .fops = &osc_max_dirty_mb_fops },
625 { .name = "osc_cached_mb",
626 .fops = &osc_cached_mb_fops },
627 { .name = "cur_dirty_bytes",
628 .fops = &osc_cur_dirty_bytes_fops },
629 { .name = "cur_grant_bytes",
630 .fops = &osc_cur_grant_bytes_fops },
631 { .name = "cur_lost_grant_bytes",
632 .fops = &osc_cur_lost_grant_bytes_fops },
633 { .name = "cur_dirty_grant_bytes",
634 .fops = &osc_cur_dirty_grant_bytes_fops },
635 { .name = "grant_shrink_interval",
636 .fops = &osc_grant_shrink_interval_fops },
637 { .name = "checksums",
638 .fops = &osc_checksum_fops },
639 { .name = "checksum_type",
640 .fops = &osc_checksum_type_fops },
641 { .name = "checksum_dump",
642 .fops = &osc_checksum_dump_fops },
643 { .name = "resend_count",
644 .fops = &osc_resend_count_fops },
645 { .name = "timeouts",
646 .fops = &osc_timeouts_fops },
647 { .name = "contention_seconds",
648 .fops = &osc_contention_seconds_fops },
649 { .name = "lockless_truncate",
650 .fops = &osc_lockless_truncate_fops },
652 .fops = &osc_import_fops },
654 .fops = &osc_state_fops },
655 { .name = "pinger_recov",
656 .fops = &osc_pinger_recov_fops },
657 { .name = "unstable_stats",
658 .fops = &osc_unstable_stats_fops },
662 #define pct(a,b) (b ? a * 100 / b : 0)
664 static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
666 struct timespec64 now;
667 struct obd_device *dev = seq->private;
668 struct client_obd *cli = &dev->u.cli;
669 unsigned long read_tot = 0, write_tot = 0, read_cum, write_cum;
672 ktime_get_real_ts64(&now);
674 spin_lock(&cli->cl_loi_list_lock);
676 seq_printf(seq, "snapshot_time: %lld.%09lu (secs.nsecs)\n",
677 (s64)now.tv_sec, now.tv_nsec);
678 seq_printf(seq, "read RPCs in flight: %d\n",
679 cli->cl_r_in_flight);
680 seq_printf(seq, "write RPCs in flight: %d\n",
681 cli->cl_w_in_flight);
682 seq_printf(seq, "pending write pages: %d\n",
683 atomic_read(&cli->cl_pending_w_pages));
684 seq_printf(seq, "pending read pages: %d\n",
685 atomic_read(&cli->cl_pending_r_pages));
687 seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
688 seq_printf(seq, "pages per rpc rpcs %% cum %% |");
689 seq_printf(seq, " rpcs %% cum %%\n");
691 read_tot = lprocfs_oh_sum(&cli->cl_read_page_hist);
692 write_tot = lprocfs_oh_sum(&cli->cl_write_page_hist);
696 for (i = 0; i < OBD_HIST_MAX; i++) {
697 unsigned long r = cli->cl_read_page_hist.oh_buckets[i];
698 unsigned long w = cli->cl_write_page_hist.oh_buckets[i];
702 seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n",
703 1 << i, r, pct(r, read_tot),
704 pct(read_cum, read_tot), w,
706 pct(write_cum, write_tot));
707 if (read_cum == read_tot && write_cum == write_tot)
711 seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
712 seq_printf(seq, "rpcs in flight rpcs %% cum %% |");
713 seq_printf(seq, " rpcs %% cum %%\n");
715 read_tot = lprocfs_oh_sum(&cli->cl_read_rpc_hist);
716 write_tot = lprocfs_oh_sum(&cli->cl_write_rpc_hist);
720 for (i = 0; i < OBD_HIST_MAX; i++) {
721 unsigned long r = cli->cl_read_rpc_hist.oh_buckets[i];
722 unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
725 seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n",
726 i, r, pct(r, read_tot),
727 pct(read_cum, read_tot), w,
729 pct(write_cum, write_tot));
730 if (read_cum == read_tot && write_cum == write_tot)
734 seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
735 seq_printf(seq, "offset rpcs %% cum %% |");
736 seq_printf(seq, " rpcs %% cum %%\n");
738 read_tot = lprocfs_oh_sum(&cli->cl_read_offset_hist);
739 write_tot = lprocfs_oh_sum(&cli->cl_write_offset_hist);
743 for (i = 0; i < OBD_HIST_MAX; i++) {
744 unsigned long r = cli->cl_read_offset_hist.oh_buckets[i];
745 unsigned long w = cli->cl_write_offset_hist.oh_buckets[i];
748 seq_printf(seq, "%d:\t\t%10lu %3lu %3lu | %10lu %3lu %3lu\n",
749 (i == 0) ? 0 : 1 << (i - 1),
750 r, pct(r, read_tot), pct(read_cum, read_tot),
751 w, pct(w, write_tot), pct(write_cum, write_tot));
752 if (read_cum == read_tot && write_cum == write_tot)
756 spin_unlock(&cli->cl_loi_list_lock);
762 static ssize_t osc_rpc_stats_seq_write(struct file *file,
763 const char __user *buf,
764 size_t len, loff_t *off)
766 struct seq_file *seq = file->private_data;
767 struct obd_device *dev = seq->private;
768 struct client_obd *cli = &dev->u.cli;
770 lprocfs_oh_clear(&cli->cl_read_rpc_hist);
771 lprocfs_oh_clear(&cli->cl_write_rpc_hist);
772 lprocfs_oh_clear(&cli->cl_read_page_hist);
773 lprocfs_oh_clear(&cli->cl_write_page_hist);
774 lprocfs_oh_clear(&cli->cl_read_offset_hist);
775 lprocfs_oh_clear(&cli->cl_write_offset_hist);
779 LPROC_SEQ_FOPS(osc_rpc_stats);
781 static int osc_stats_seq_show(struct seq_file *seq, void *v)
783 struct timespec64 now;
784 struct obd_device *dev = seq->private;
785 struct osc_stats *stats = &obd2osc_dev(dev)->od_stats;
787 ktime_get_real_ts64(&now);
789 seq_printf(seq, "snapshot_time: %lld.%09lu (secs.nsecs)\n",
790 (s64)now.tv_sec, now.tv_nsec);
791 seq_printf(seq, "lockless_write_bytes\t\t%llu\n",
792 stats->os_lockless_writes);
793 seq_printf(seq, "lockless_read_bytes\t\t%llu\n",
794 stats->os_lockless_reads);
795 seq_printf(seq, "lockless_truncate\t\t%llu\n",
796 stats->os_lockless_truncates);
800 static ssize_t osc_stats_seq_write(struct file *file,
801 const char __user *buf,
802 size_t len, loff_t *off)
804 struct seq_file *seq = file->private_data;
805 struct obd_device *dev = seq->private;
806 struct osc_stats *stats = &obd2osc_dev(dev)->od_stats;
808 memset(stats, 0, sizeof(*stats));
812 LPROC_SEQ_FOPS(osc_stats);
814 int lproc_osc_attach_seqstat(struct obd_device *dev)
818 rc = lprocfs_seq_create(dev->obd_proc_entry, "osc_stats", 0644,
819 &osc_stats_fops, dev);
821 rc = lprocfs_obd_seq_create(dev, "rpc_stats", 0644,
822 &osc_rpc_stats_fops, dev);
826 #endif /* CONFIG_PROC_FS */