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) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Use is subject to license terms.
26 * Copyright (c) 2011, 2015, Intel Corporation.
29 * This file is part of Lustre, http://www.lustre.org/
31 * lustre/osd/osd_lproc.c
33 * Author: Mikhail Pershin <tappro@sun.com>
36 #define DEBUG_SUBSYSTEM S_OSD
38 #include <lprocfs_status.h>
40 #include "osd_internal.h"
42 void osd_brw_stats_update(struct osd_device *osd, struct osd_iobuf *iobuf)
44 struct brw_stats *bs = &osd->od_brw_stats;
45 int nr_pages = iobuf->dr_npages;
46 int rw = iobuf->dr_rw;
48 if (unlikely(nr_pages == 0))
51 lprocfs_oh_tally_log2_pcpu(&bs->bs_hist[BRW_R_PAGES + rw], nr_pages);
53 lprocfs_oh_tally_pcpu(&bs->bs_hist[BRW_R_DISCONT_PAGES+rw],
55 lprocfs_oh_tally_pcpu(&bs->bs_hist[BRW_R_DISCONT_BLOCKS+rw],
59 #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 17, 53, 0)
60 static void osd_symlink_brw_stats(struct osd_device *osd)
69 OBD_ALLOC(path, PATH_MAX);
73 p = dentry_path_raw(osd->od_dt_dev.dd_debugfs_entry, path, PATH_MAX);
77 root = osd->od_dt_dev.dd_debugfs_entry->d_sb->s_fs_info;
78 len_root = strlen(root);
80 if (len_root > (p - path) || len_root + len_path + 16 > PATH_MAX)
83 strscpy(path, root, len_root);
84 if (p > path + len_root) {
86 while ((*s++ = *p++) != '\0');
89 *(path + len_root + len_path) = '\0';
90 strcat(path, "/brw_stats");
91 lprocfs_add_symlink("brw_stats", osd->od_proc_entry,
92 "/sys/kernel/debug/%s", path);
95 OBD_FREE(path, PATH_MAX);
99 static int osd_stats_init(struct osd_device *osd)
101 int result = -ENOMEM;
104 osd->od_stats = lprocfs_stats_alloc(LPROC_OSD_LAST, 0);
106 lprocfs_counter_init(osd->od_stats, LPROC_OSD_GET_PAGE,
107 LPROCFS_TYPE_LATENCY, "get_page");
108 lprocfs_counter_init(osd->od_stats, LPROC_OSD_NO_PAGE,
109 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_REQS,
110 "get_page_failures");
111 lprocfs_counter_init(osd->od_stats, LPROC_OSD_CACHE_ACCESS,
112 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
114 lprocfs_counter_init(osd->od_stats, LPROC_OSD_CACHE_HIT,
115 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
117 lprocfs_counter_init(osd->od_stats, LPROC_OSD_CACHE_MISS,
118 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
120 #if OSD_THANDLE_STATS
121 lprocfs_counter_init(osd->od_stats, LPROC_OSD_THANDLE_STARTING,
122 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_USECS,
124 lprocfs_counter_init(osd->od_stats, LPROC_OSD_THANDLE_OPEN,
125 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_USECS,
127 lprocfs_counter_init(osd->od_stats, LPROC_OSD_THANDLE_CLOSING,
128 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_USECS,
131 lprocfs_counter_init(osd->od_stats, LPROC_OSD_TOO_MANY_CREDITS,
132 LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_REQS,
137 ldebugfs_register_osd_stats(osd->od_dt_dev.dd_debugfs_entry,
138 &osd->od_brw_stats, osd->od_stats);
140 #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 17, 53, 0)
141 osd_symlink_brw_stats(osd);
147 static ssize_t fstype_show(struct kobject *kobj, struct attribute *attr,
150 return sprintf(buf, "ldiskfs\n");
152 LUSTRE_RO_ATTR(fstype);
154 static ssize_t mntdev_show(struct kobject *kobj, struct attribute *attr,
157 struct dt_device *dt = container_of(kobj, struct dt_device,
159 struct osd_device *osd = osd_dt_dev(dt);
162 if (unlikely(!osd->od_mnt))
165 return sprintf(buf, "%s\n", osd->od_mntdev);
167 LUSTRE_RO_ATTR(mntdev);
169 static ssize_t read_cache_enable_show(struct kobject *kobj,
170 struct attribute *attr,
173 struct dt_device *dt = container_of(kobj, struct dt_device,
175 struct osd_device *osd = osd_dt_dev(dt);
178 if (unlikely(!osd->od_mnt))
181 return sprintf(buf, "%u\n", osd->od_read_cache);
184 static ssize_t read_cache_enable_store(struct kobject *kobj,
185 struct attribute *attr,
186 const char *buffer, size_t count)
188 struct dt_device *dt = container_of(kobj, struct dt_device,
190 struct osd_device *osd = osd_dt_dev(dt);
195 if (unlikely(!osd->od_mnt))
198 rc = kstrtobool(buffer, &val);
202 osd->od_read_cache = !!val;
205 LUSTRE_RW_ATTR(read_cache_enable);
207 static ssize_t writethrough_cache_enable_show(struct kobject *kobj,
208 struct attribute *attr,
211 struct dt_device *dt = container_of(kobj, struct dt_device,
213 struct osd_device *osd = osd_dt_dev(dt);
216 if (unlikely(!osd->od_mnt))
219 return sprintf(buf, "%u\n", osd->od_writethrough_cache);
222 static ssize_t writethrough_cache_enable_store(struct kobject *kobj,
223 struct attribute *attr,
227 struct dt_device *dt = container_of(kobj, struct dt_device,
229 struct osd_device *osd = osd_dt_dev(dt);
234 if (unlikely(!osd->od_mnt))
237 rc = kstrtobool(buffer, &val);
241 osd->od_writethrough_cache = !!val;
244 LUSTRE_RW_ATTR(writethrough_cache_enable);
246 static ssize_t enable_projid_xattr_show(struct kobject *kobj,
247 struct attribute *attr,
250 struct dt_device *dt = container_of(kobj, struct dt_device,
252 struct osd_device *osd = osd_dt_dev(dt);
255 if (unlikely(!osd->od_mnt))
258 return snprintf(buf, PAGE_SIZE, "%u\n", osd->od_enable_projid_xattr);
261 static ssize_t enable_projid_xattr_store(struct kobject *kobj,
262 struct attribute *attr,
266 struct dt_device *dt = container_of(kobj, struct dt_device,
268 struct osd_device *osd = osd_dt_dev(dt);
273 if (unlikely(!osd->od_mnt))
276 rc = kstrtobool(buffer, &val);
280 osd->od_enable_projid_xattr = !!val;
283 LUSTRE_RW_ATTR(enable_projid_xattr);
285 static ssize_t fallocate_zero_blocks_show(struct kobject *kobj,
286 struct attribute *attr,
289 struct dt_device *dt = container_of(kobj, struct dt_device,
291 struct osd_device *osd = osd_dt_dev(dt);
294 if (unlikely(!osd->od_mnt))
297 return scnprintf(buf, PAGE_SIZE, "%d\n", osd->od_fallocate_zero_blocks);
301 * Set how fallocate() interacts with the backing filesystem:
302 * -1: fallocate is disabled and returns -EOPNOTSUPP
303 * 0: fallocate allocates unwritten extents (like ext4)
304 * 1: fallocate zeroes allocated extents on disk
306 static ssize_t fallocate_zero_blocks_store(struct kobject *kobj,
307 struct attribute *attr,
308 const char *buffer, size_t count)
310 struct dt_device *dt = container_of(kobj, struct dt_device,
312 struct osd_device *osd = osd_dt_dev(dt);
317 if (unlikely(!osd->od_mnt))
320 rc = kstrtol(buffer, 0, &val);
324 if (val < -1 || val > 1)
327 osd->od_fallocate_zero_blocks = val;
330 LUSTRE_RW_ATTR(fallocate_zero_blocks);
332 ssize_t force_sync_store(struct kobject *kobj, struct attribute *attr,
333 const char *buffer, size_t count)
335 struct dt_device *dt = container_of(kobj, struct dt_device, dd_kobj);
336 struct osd_device *osd = osd_dt_dev(dt);
340 if (unlikely(!osd->od_mnt))
343 flush_workqueue(LDISKFS_SB(osd_sb(osd_dt_dev(dt)))->s_misc_wq);
344 rc = dt_sync(NULL, dt);
346 return rc == 0 ? count : rc;
348 LUSTRE_WO_ATTR(force_sync);
350 static ssize_t nonrotational_show(struct kobject *kobj, struct attribute *attr,
353 struct dt_device *dt = container_of(kobj, struct dt_device,
355 struct osd_device *osd = osd_dt_dev(dt);
358 if (unlikely(!osd->od_mnt))
361 return sprintf(buf, "%u\n", osd->od_nonrotational);
364 static ssize_t nonrotational_store(struct kobject *kobj,
365 struct attribute *attr, const char *buffer,
368 struct dt_device *dt = container_of(kobj, struct dt_device,
370 struct osd_device *osd = osd_dt_dev(dt);
375 if (unlikely(!osd->od_mnt))
378 rc = kstrtobool(buffer, &val);
382 osd->od_nonrotational = val;
385 LUSTRE_RW_ATTR(nonrotational);
387 static ssize_t pdo_show(struct kobject *kobj, struct attribute *attr,
390 return sprintf(buf, "%s\n", ldiskfs_pdo ? "ON" : "OFF");
393 static ssize_t pdo_store(struct kobject *kobj, struct attribute *attr,
394 const char *buffer, size_t count)
399 rc = kstrtobool(buffer, &pdo);
409 static ssize_t auto_scrub_show(struct kobject *kobj, struct attribute *attr,
412 struct dt_device *dt = container_of(kobj, struct dt_device,
414 struct osd_device *dev = osd_dt_dev(dt);
417 if (unlikely(!dev->od_mnt))
420 return scnprintf(buf, PAGE_SIZE, "%lld\n",
421 dev->od_scrub.os_scrub.os_auto_scrub_interval);
424 static ssize_t auto_scrub_store(struct kobject *kobj, struct attribute *attr,
425 const char *buffer, size_t count)
427 struct dt_device *dt = container_of(kobj, struct dt_device,
429 struct osd_device *dev = osd_dt_dev(dt);
434 if (unlikely(!dev->od_mnt))
437 rc = kstrtoll(buffer, 0, &val);
441 dev->od_scrub.os_scrub.os_auto_scrub_interval = val;
444 LUSTRE_RW_ATTR(auto_scrub);
446 static ssize_t full_scrub_ratio_show(struct kobject *kobj,
447 struct attribute *attr,
450 struct dt_device *dt = container_of(kobj, struct dt_device,
452 struct osd_device *dev = osd_dt_dev(dt);
455 if (unlikely(!dev->od_mnt))
458 return sprintf(buf, "%llu\n", dev->od_full_scrub_ratio);
461 static ssize_t full_scrub_ratio_store(struct kobject *kobj,
462 struct attribute *attr,
463 const char *buffer, size_t count)
465 struct dt_device *dt = container_of(kobj, struct dt_device,
467 struct osd_device *dev = osd_dt_dev(dt);
472 if (unlikely(!dev->od_mnt))
475 rc = kstrtoll(buffer, 0, &val);
482 dev->od_full_scrub_ratio = val;
485 LUSTRE_RW_ATTR(full_scrub_ratio);
487 static ssize_t full_scrub_threshold_rate_show(struct kobject *kobj,
488 struct attribute *attr,
491 struct dt_device *dt = container_of(kobj, struct dt_device,
493 struct osd_device *dev = osd_dt_dev(dt);
496 if (unlikely(!dev->od_mnt))
499 return sprintf(buf, "%llu (bad OI mappings/minute)\n",
500 dev->od_full_scrub_threshold_rate);
503 static ssize_t full_scrub_threshold_rate_store(struct kobject *kobj,
504 struct attribute *attr,
505 const char *buffer, size_t count)
507 struct dt_device *dt = container_of(kobj, struct dt_device,
509 struct osd_device *dev = osd_dt_dev(dt);
514 if (unlikely(!dev->od_mnt))
517 rc = kstrtoull(buffer, 0, &val);
521 dev->od_full_scrub_threshold_rate = val;
524 LUSTRE_RW_ATTR(full_scrub_threshold_rate);
526 static ssize_t extent_bytes_allocation_show(struct kobject *kobj,
527 struct attribute *attr, char *buf)
529 struct dt_device *dt = container_of(kobj, struct dt_device,
531 struct osd_device *dev = osd_dt_dev(dt);
533 unsigned int min = (unsigned int)(~0), cur;
535 for_each_online_cpu(i) {
536 cur = *per_cpu_ptr(dev->od_extent_bytes_percpu, i);
540 return snprintf(buf, PAGE_SIZE, "%u\n", min);
542 LUSTRE_RO_ATTR(extent_bytes_allocation);
544 static int ldiskfs_osd_oi_scrub_seq_show(struct seq_file *m, void *data)
546 struct osd_device *dev = osd_dt_dev((struct dt_device *)m->private);
548 LASSERT(dev != NULL);
549 if (unlikely(dev->od_mnt == NULL))
552 osd_scrub_dump(m, dev);
556 LDEBUGFS_SEQ_FOPS_RO(ldiskfs_osd_oi_scrub);
558 static int ldiskfs_osd_readcache_seq_show(struct seq_file *m, void *data)
560 struct osd_device *osd = osd_dt_dev((struct dt_device *)m->private);
562 LASSERT(osd != NULL);
563 if (unlikely(osd->od_mnt == NULL))
566 seq_printf(m, "%llu\n", osd->od_readcache_max_filesize);
571 ldiskfs_osd_readcache_seq_write(struct file *file, const char __user *buffer,
572 size_t count, loff_t *off)
574 struct seq_file *m = file->private_data;
575 struct dt_device *dt = m->private;
576 struct osd_device *osd = osd_dt_dev(dt);
577 char kernbuf[22] = "";
581 LASSERT(osd != NULL);
582 if (unlikely(osd->od_mnt == NULL))
585 if (count >= sizeof(kernbuf))
588 if (copy_from_user(kernbuf, buffer, count))
592 rc = sysfs_memparse(kernbuf, count, &val, "B");
596 osd->od_readcache_max_filesize = val > OSD_MAX_CACHE_SIZE ?
597 OSD_MAX_CACHE_SIZE : val;
601 LDEBUGFS_SEQ_FOPS(ldiskfs_osd_readcache);
603 static int ldiskfs_osd_readcache_max_io_seq_show(struct seq_file *m, void *data)
605 struct osd_device *osd = osd_dt_dev((struct dt_device *)m->private);
607 LASSERT(osd != NULL);
608 if (unlikely(osd->od_mnt == NULL))
611 seq_printf(m, "%lu\n", osd->od_readcache_max_iosize >> 20);
616 ldiskfs_osd_readcache_max_io_seq_write(struct file *file,
617 const char __user *buffer,
618 size_t count, loff_t *off)
620 struct seq_file *m = file->private_data;
621 struct dt_device *dt = m->private;
622 struct osd_device *osd = osd_dt_dev(dt);
623 char kernbuf[22] = "";
627 LASSERT(osd != NULL);
628 if (unlikely(osd->od_mnt == NULL))
631 if (count >= sizeof(kernbuf))
634 if (copy_from_user(kernbuf, buffer, count))
638 rc = sysfs_memparse(kernbuf, count, &val, "MiB");
642 if (val > PTLRPC_MAX_BRW_SIZE)
644 osd->od_readcache_max_iosize = val;
648 LDEBUGFS_SEQ_FOPS(ldiskfs_osd_readcache_max_io);
650 static int ldiskfs_osd_writethrough_max_io_seq_show(struct seq_file *m,
653 struct osd_device *osd = osd_dt_dev((struct dt_device *)m->private);
655 LASSERT(osd != NULL);
656 if (unlikely(osd->od_mnt == NULL))
659 seq_printf(m, "%lu\n", osd->od_writethrough_max_iosize >> 20);
664 ldiskfs_osd_writethrough_max_io_seq_write(struct file *file,
665 const char __user *buffer,
666 size_t count, loff_t *off)
668 struct seq_file *m = file->private_data;
669 struct dt_device *dt = m->private;
670 struct osd_device *osd = osd_dt_dev(dt);
671 char kernbuf[22] = "";
675 LASSERT(osd != NULL);
676 if (unlikely(osd->od_mnt == NULL))
679 if (count >= sizeof(kernbuf))
682 if (copy_from_user(kernbuf, buffer, count))
686 rc = sysfs_memparse(kernbuf, count, &val, "MiB");
690 if (val > PTLRPC_MAX_BRW_SIZE)
692 osd->od_writethrough_max_iosize = val;
696 LDEBUGFS_SEQ_FOPS(ldiskfs_osd_writethrough_max_io);
698 #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 52, 0)
699 static ssize_t index_in_idif_show(struct kobject *kobj, struct attribute *attr,
702 struct dt_device *dt = container_of(kobj, struct dt_device,
704 struct osd_device *dev = osd_dt_dev(dt);
707 if (unlikely(!dev->od_mnt))
710 return sprintf(buf, "%d\n", (int)(dev->od_index_in_idif));
713 static ssize_t index_in_idif_store(struct kobject *kobj,
714 struct attribute *attr,
715 const char *buffer, size_t count)
717 struct dt_device *dt = container_of(kobj, struct dt_device,
719 struct osd_device *dev = osd_dt_dev(dt);
720 struct lu_target *tgt;
726 if (unlikely(!dev->od_mnt))
729 rc = kstrtobool(buffer, &val);
733 if (dev->od_index_in_idif) {
737 LCONSOLE_WARN("%s: OST-index in IDIF has been enabled, "
738 "it cannot be reverted back.\n", osd_name(dev));
745 rc = lu_env_init(&env, LCT_DT_THREAD);
749 tgt = dev->od_dt_dev.dd_lu_dev.ld_site->ls_tgt;
750 tgt->lut_lsd.lsd_feature_rocompat |= OBD_ROCOMPAT_IDX_IN_IDIF;
751 rc = tgt_server_data_update(&env, tgt, 1);
756 LCONSOLE_INFO("%s: enable OST-index in IDIF successfully, "
757 "it cannot be reverted back.\n", osd_name(dev));
759 dev->od_index_in_idif = 1;
762 LUSTRE_RW_ATTR(index_in_idif);
764 int osd_register_proc_index_in_idif(struct osd_device *osd)
766 struct dt_device *dt = &osd->od_dt_dev;
768 return sysfs_create_file(&dt->dd_kobj, &lustre_attr_index_in_idif.attr);
772 static ssize_t index_backup_show(struct kobject *kobj, struct attribute *attr,
775 struct dt_device *dt = container_of(kobj, struct dt_device,
777 struct osd_device *dev = osd_dt_dev(dt);
780 if (unlikely(!dev->od_mnt))
783 return sprintf(buf, "%d\n", dev->od_index_backup_policy);
786 ssize_t index_backup_store(struct kobject *kobj, struct attribute *attr,
787 const char *buffer, size_t count)
789 struct dt_device *dt = container_of(kobj, struct dt_device,
791 struct osd_device *dev = osd_dt_dev(dt);
796 if (unlikely(!dev->od_mnt))
799 rc = kstrtoint(buffer, 0, &val);
803 dev->od_index_backup_policy = val;
806 LUSTRE_RW_ATTR(index_backup);
808 #ifdef LDISKFS_GET_BLOCKS_VERY_DENSE
809 static ssize_t extents_dense_show(struct kobject *kobj, struct attribute *attr,
812 struct dt_device *dt = container_of(kobj, struct dt_device, dd_kobj);
813 struct osd_device *osd = osd_dt_dev(dt);
815 return snprintf(buf, PAGE_SIZE, "%d\n", osd->od_extents_dense);
818 static ssize_t extents_dense_store(struct kobject *kobj, struct attribute *attr,
819 const char *buffer, size_t count)
821 struct dt_device *dt = container_of(kobj, struct dt_device, dd_kobj);
822 struct osd_device *osd = osd_dt_dev(dt);
826 rc = kstrtobool(buffer, &extents_dense);
830 osd->od_extents_dense = extents_dense;
834 LUSTRE_RW_ATTR(extents_dense);
837 struct ldebugfs_vars ldebugfs_osd_obd_vars[] = {
838 { .name = "oi_scrub",
839 .fops = &ldiskfs_osd_oi_scrub_fops },
840 { .name = "readcache_max_filesize",
841 .fops = &ldiskfs_osd_readcache_fops },
842 { .name = "readcache_max_io_mb",
843 .fops = &ldiskfs_osd_readcache_max_io_fops },
844 { .name = "writethrough_max_io_mb",
845 .fops = &ldiskfs_osd_writethrough_max_io_fops },
849 static struct attribute *ldiskfs_attrs[] = {
850 &lustre_attr_read_cache_enable.attr,
851 &lustre_attr_writethrough_cache_enable.attr,
852 &lustre_attr_enable_projid_xattr.attr,
853 &lustre_attr_fstype.attr,
854 &lustre_attr_mntdev.attr,
855 &lustre_attr_fallocate_zero_blocks.attr,
856 &lustre_attr_force_sync.attr,
857 &lustre_attr_nonrotational.attr,
858 &lustre_attr_index_backup.attr,
859 &lustre_attr_auto_scrub.attr,
860 &lustre_attr_pdo.attr,
861 &lustre_attr_full_scrub_ratio.attr,
862 &lustre_attr_full_scrub_threshold_rate.attr,
863 &lustre_attr_extent_bytes_allocation.attr,
864 #ifdef LDISKFS_GET_BLOCKS_VERY_DENSE
865 &lustre_attr_extents_dense.attr,
870 KOBJ_ATTRIBUTE_GROUPS(ldiskfs); /* creates ldiskfs_groups from ldiskfs_attrs */
872 int osd_procfs_init(struct osd_device *osd, const char *name)
874 struct obd_type *type;
879 /* at the moment there is no linkage between lu_type
880 * and obd_type, so we lookup obd_type this way
882 type = class_search_type(LUSTRE_OSD_LDISKFS_NAME);
887 CDEBUG(D_CONFIG, "%s: register osd-ldiskfs tunable parameters\n", name);
889 /* put reference taken by class_search_type */
890 kobject_put(&type->typ_kobj);
892 osd->od_dt_dev.dd_ktype.default_groups = KOBJ_ATTR_GROUPS(ldiskfs);
893 rc = dt_tunables_init(&osd->od_dt_dev, type, name,
894 ldebugfs_osd_obd_vars);
896 CERROR("%s: cannot setup sysfs / debugfs entry: %d\n",
901 if (osd->od_proc_entry)
904 /* Find the type procroot and add the proc entry for this device */
905 osd->od_proc_entry = lprocfs_register(name, type->typ_procroot,
906 NULL, &osd->od_dt_dev);
907 if (IS_ERR(osd->od_proc_entry)) {
908 rc = PTR_ERR(osd->od_proc_entry);
909 CERROR("Error %d setting up lprocfs for %s\n",
911 osd->od_proc_entry = NULL;
915 rc = osd_stats_init(osd);
920 osd_procfs_fini(osd);
924 int osd_procfs_fini(struct osd_device *osd)
926 lprocfs_fini_brw_stats(&osd->od_brw_stats);
929 lprocfs_stats_free(&osd->od_stats);
931 if (osd->od_proc_entry)
932 lprocfs_remove(&osd->od_proc_entry);
934 return dt_tunables_fini(&osd->od_dt_dev);