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 2008 Sun Microsystems, Inc. All rights reserved
24 * Use is subject to license terms.
26 * Copyright (c) 2012, 2017, 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 <lprocfs_status.h>
35 #include <obd_class.h>
36 #include <linux/seq_file.h>
37 #include "lod_internal.h"
38 #include <uapi/linux/lustre/lustre_param.h>
41 * Notice, all the functions below (except for lod_procfs_init() and
42 * lod_procfs_fini()) are not supposed to be used directly. They are
43 * called by Linux kernel's procfs.
49 * Show default stripe size.
51 * \param[in] m seq file
52 * \param[in] v unused for single entry
54 * \retval 0 on success
55 * \retval negative error code if failed
57 static int lod_dom_stripesize_seq_show(struct seq_file *m, void *v)
59 struct obd_device *dev = m->private;
60 struct lod_device *lod;
63 lod = lu2lod_dev(dev->obd_lu_dev);
64 seq_printf(m, "%u\n", lod->lod_dom_max_stripesize);
69 * Set default stripe size.
71 * \param[in] file proc file
72 * \param[in] buffer string containing the maximum number of bytes stored in
73 * each object before moving to the next object in the
75 * \param[in] count @buffer length
76 * \param[in] off unused for single entry
78 * \retval @count on success
79 * \retval negative error code if failed
82 lod_dom_stripesize_seq_write(struct file *file, const char __user *buffer,
83 size_t count, loff_t *off)
85 struct seq_file *m = file->private_data;
86 struct obd_device *dev = m->private;
87 struct lod_device *lod;
92 lod = lu2lod_dev(dev->obd_lu_dev);
93 rc = lprocfs_str_with_units_to_s64(buffer, count, &val, '1');
99 /* 1GB is the limit */
100 if (val > (1ULL << 30))
103 if (val < LOV_MIN_STRIPE_SIZE) {
104 LCONSOLE_INFO("Increasing provided stripe size to "
105 "a minimum value %u\n",
106 LOV_MIN_STRIPE_SIZE);
107 val = LOV_MIN_STRIPE_SIZE;
108 } else if (val & (LOV_MIN_STRIPE_SIZE - 1)) {
109 val &= ~(LOV_MIN_STRIPE_SIZE - 1);
110 LCONSOLE_WARN("Changing provided stripe size to %llu "
111 "(a multiple of minimum %u)\n",
112 val, LOV_MIN_STRIPE_SIZE);
116 lod->lod_dom_max_stripesize = val;
120 LPROC_SEQ_FOPS(lod_dom_stripesize);
123 * Show default stripe size.
125 * \param[in] m seq file
126 * \param[in] v unused for single entry
128 * \retval 0 on success
129 * \retval negative error code if failed
131 static int lod_stripesize_seq_show(struct seq_file *m, void *v)
133 struct obd_device *dev = m->private;
134 struct lod_device *lod;
136 LASSERT(dev != NULL);
137 lod = lu2lod_dev(dev->obd_lu_dev);
138 seq_printf(m, "%llu\n",
139 lod->lod_desc.ld_default_stripe_size);
144 * Set default stripe size.
146 * \param[in] file proc file
147 * \param[in] buffer string containing the maximum number of bytes stored in
148 * each object before moving to the next object in the
150 * \param[in] count @buffer length
151 * \param[in] off unused for single entry
153 * \retval @count on success
154 * \retval negative error code if failed
157 lod_stripesize_seq_write(struct file *file, const char __user *buffer,
158 size_t count, loff_t *off)
160 struct seq_file *m = file->private_data;
161 struct obd_device *dev = m->private;
162 struct lod_device *lod;
166 LASSERT(dev != NULL);
167 lod = lu2lod_dev(dev->obd_lu_dev);
168 rc = lprocfs_str_with_units_to_s64(buffer, count, &val, '1');
174 lod_fix_desc_stripe_size(&val);
175 lod->lod_desc.ld_default_stripe_size = val;
179 LPROC_SEQ_FOPS(lod_stripesize);
182 * Show default stripe offset.
184 * \param[in] m seq file
185 * \param[in] v unused for single entry
187 * \retval 0 on success
188 * \retval negative error code if failed
190 static ssize_t stripeoffset_show(struct kobject *kobj, struct attribute *attr,
193 struct dt_device *dt = container_of(kobj, struct dt_device,
195 struct lod_device *lod = dt2lod_dev(dt);
197 return sprintf(buf, "%lld\n", lod->lod_desc.ld_default_stripe_offset);
201 * Set default stripe offset.
203 * Usually contains -1 allowing Lustre to balance objects among OST
204 * otherwise may cause severe OST imbalance.
206 * \param[in] file proc file
207 * \param[in] buffer string describing starting OST index for new files
208 * \param[in] count @buffer length
209 * \param[in] off unused for single entry
211 * \retval @count on success
212 * \retval negative error code if failed
214 static ssize_t stripeoffset_store(struct kobject *kobj, struct attribute *attr,
215 const char *buffer, size_t count)
217 struct dt_device *dt = container_of(kobj, struct dt_device,
219 struct lod_device *lod = dt2lod_dev(dt);
223 rc = kstrtol(buffer, 0, &val);
227 if (val < -1 || val > LOV_MAX_STRIPE_COUNT)
230 lod->lod_desc.ld_default_stripe_offset = val;
234 LUSTRE_RW_ATTR(stripeoffset);
237 * Show default striping pattern (LOV_PATTERN_*).
239 * \param[in] m seq file
240 * \param[in] v unused for single entry
242 * \retval 0 on success
243 * \retval negative error code if failed
245 static ssize_t stripetype_show(struct kobject *kobj, struct attribute *attr,
248 struct dt_device *dt = container_of(kobj, struct dt_device,
250 struct lod_device *lod = dt2lod_dev(dt);
252 return sprintf(buf, "%u\n", lod->lod_desc.ld_pattern);
256 * Set default striping pattern (a number, not a human-readable string).
258 * \param[in] file proc file
259 * \param[in] buffer string containing the default striping pattern for new
260 * files. This is an integer LOV_PATTERN_* value
261 * \param[in] count @buffer length
262 * \param[in] off unused for single entry
264 * \retval @count on success
265 * \retval negative error code if failed
267 static ssize_t stripetype_store(struct kobject *kobj, struct attribute *attr,
268 const char *buffer, size_t count)
270 struct dt_device *dt = container_of(kobj, struct dt_device,
272 struct lod_device *lod = dt2lod_dev(dt);
276 rc = kstrtouint(buffer, 0, &pattern);
280 lod_fix_desc_pattern(&pattern);
281 lod->lod_desc.ld_pattern = pattern;
285 LUSTRE_RW_ATTR(stripetype);
288 * Show default number of stripes.
290 * \param[in] m seq file
291 * \param[in] v unused for single entry
293 * \retval 0 on success,
294 * \retval negative error code if failed
296 static ssize_t stripecount_show(struct kobject *kobj, struct attribute *attr,
299 struct dt_device *dt = container_of(kobj, struct dt_device,
301 struct lod_device *lod = dt2lod_dev(dt);
303 return sprintf(buf, "%d\n",
304 (s16)(lod->lod_desc.ld_default_stripe_count + 1) - 1);
308 * Set default number of stripes.
310 * \param[in] file proc file
311 * \param[in] buffer string containing the default number of stripes
313 * \param[in] count @buffer length
314 * \param[in] off unused for single entry
316 * \retval @count on success
317 * \retval negative error code otherwise
319 static ssize_t stripecount_store(struct kobject *kobj, struct attribute *attr,
320 const char *buffer, size_t count)
322 struct dt_device *dt = container_of(kobj, struct dt_device,
324 struct lod_device *lod = dt2lod_dev(dt);
328 rc = kstrtoint(buffer, 0, &stripe_count);
332 if (stripe_count < -1)
335 lod_fix_desc_stripe_count(&stripe_count);
336 lod->lod_desc.ld_default_stripe_count = stripe_count;
340 LUSTRE_RW_ATTR(stripecount);
343 * Show number of targets.
345 * \param[in] m seq file
346 * \param[in] v unused for single entry
348 * \retval 0 on success
349 * \retval negative error code if failed
351 static ssize_t numobd_show(struct kobject *kobj, struct attribute *attr,
354 struct dt_device *dt = container_of(kobj, struct dt_device,
356 struct lod_device *lod = dt2lod_dev(dt);
358 return sprintf(buf, "%u\n", lod->lod_desc.ld_tgt_count);
360 LUSTRE_RO_ATTR(numobd);
363 * Show number of active targets.
365 * \param[in] m seq file
366 * \param[in] v unused for single entry
368 * \retval 0 on success
369 * \retval negative error code if failed
371 static ssize_t activeobd_show(struct kobject *kobj, struct attribute *attr,
374 struct dt_device *dt = container_of(kobj, struct dt_device,
376 struct lod_device *lod = dt2lod_dev(dt);
378 return sprintf(buf, "%u\n", lod->lod_desc.ld_active_tgt_count);
380 LUSTRE_RO_ATTR(activeobd);
383 * Show UUID of LOD device.
385 * \param[in] m seq file
386 * \param[in] v unused for single entry
388 * \retval 0 on success
389 * \retval negative error code if failed
391 static ssize_t desc_uuid_show(struct kobject *kobj, struct attribute *attr,
394 struct dt_device *dt = container_of(kobj, struct dt_device,
396 struct lod_device *lod = dt2lod_dev(dt);
398 return sprintf(buf, "%s\n", lod->lod_desc.ld_uuid.uuid);
400 LUSTRE_RO_ATTR(desc_uuid);
403 * Show QoS priority parameter.
405 * The printed value is a percentage value (0-100%) indicating the priority
406 * of free space compared to performance. 0% means select OSTs equally
407 * regardless of their free space, 100% means select OSTs only by their free
408 * space even if it results in very imbalanced load on the OSTs.
410 * \param[in] m seq file
411 * \param[in] v unused for single entry
413 * \retval 0 on success
414 * \retval negative error code if failed
416 static ssize_t qos_prio_free_show(struct kobject *kobj, struct attribute *attr,
419 struct dt_device *dt = container_of(kobj, struct dt_device,
421 struct lod_device *lod = dt2lod_dev(dt);
423 return sprintf(buf, "%d%%\n",
424 (lod->lod_qos.lq_prio_free * 100 + 255) >> 8);
428 * Set QoS free space priority parameter.
430 * Set the relative priority of free OST space compared to OST load when OSTs
431 * are space imbalanced. See lod_qos_priofree_seq_show() for description of
432 * this parameter. See lod_qos_thresholdrr_seq_write() and lq_threshold_rr to
433 * determine what constitutes "space imbalanced" OSTs.
435 * \param[in] file proc file
436 * \param[in] buffer string which contains the free space priority (0-100)
437 * \param[in] count @buffer length
438 * \param[in] off unused for single entry
440 * \retval @count on success
441 * \retval negative error code if failed
443 static ssize_t qos_prio_free_store(struct kobject *kobj, struct attribute *attr,
444 const char *buffer, size_t count)
446 struct dt_device *dt = container_of(kobj, struct dt_device,
448 struct lod_device *lod = dt2lod_dev(dt);
452 rc = kstrtouint(buffer, 0, &val);
458 lod->lod_qos.lq_prio_free = (val << 8) / 100;
459 lod->lod_qos.lq_dirty = 1;
460 lod->lod_qos.lq_reset = 1;
464 LUSTRE_RW_ATTR(qos_prio_free);
467 * Show threshold for "same space on all OSTs" rule.
469 * \param[in] m seq file
470 * \param[in] v unused for single entry
472 * \retval 0 on success
473 * \retval negative error code if failed
475 static int lod_qos_thresholdrr_seq_show(struct seq_file *m, void *v)
477 struct obd_device *dev = m->private;
478 struct lod_device *lod;
480 LASSERT(dev != NULL);
481 lod = lu2lod_dev(dev->obd_lu_dev);
482 seq_printf(m, "%d%%\n",
483 (lod->lod_qos.lq_threshold_rr * 100 + 255) >> 8);
488 * Set threshold for "same space on all OSTs" rule.
490 * This sets the maximum percentage difference of free space between the most
491 * full and most empty OST in the currently available OSTs. If this percentage
492 * is exceeded, use the QoS allocator to select OSTs based on their available
493 * space so that more full OSTs are chosen less often, otherwise use the
494 * round-robin allocator for efficiency and performance.
496 * \param[in] file proc file
497 * \param[in] buffer string containing percentage difference of free space
498 * \param[in] count @buffer length
499 * \param[in] off unused for single entry
501 * \retval @count on success
502 * \retval negative error code if failed
505 lod_qos_thresholdrr_seq_write(struct file *file, const char __user *buffer,
506 size_t count, loff_t *off)
508 struct seq_file *m = file->private_data;
509 struct obd_device *dev = m->private;
510 struct lod_device *lod;
514 LASSERT(dev != NULL);
515 lod = lu2lod_dev(dev->obd_lu_dev);
517 rc = lprocfs_str_with_units_to_s64(buffer, count, &val, '%');
521 if (val > 100 || val < 0)
524 lod->lod_qos.lq_threshold_rr = (val << 8) / 100;
525 lod->lod_qos.lq_dirty = 1;
529 LPROC_SEQ_FOPS(lod_qos_thresholdrr);
532 * Show expiration period used to refresh cached statfs data, which
533 * is used to implement QoS/RR striping allocation algorithm.
535 * \param[in] m seq file
536 * \param[in] v unused for single entry
538 * \retval 0 on success
539 * \retval negative error code if failed
541 static ssize_t qos_maxage_show(struct kobject *kobj, struct attribute *attr,
544 struct dt_device *dt = container_of(kobj, struct dt_device,
546 struct lod_device *lod = dt2lod_dev(dt);
548 return sprintf(buf, "%u Sec\n", lod->lod_desc.ld_qos_maxage);
552 * Set expiration period used to refresh cached statfs data.
554 * \param[in] file proc file
555 * \param[in] buffer string contains maximum age of statfs data in seconds
556 * \param[in] count @buffer length
557 * \param[in] off unused for single entry
559 * \retval @count on success
560 * \retval negative error code if failed
562 static ssize_t qos_maxage_store(struct kobject *kobj, struct attribute *attr,
563 const char *buffer, size_t count)
565 struct dt_device *dt = container_of(kobj, struct dt_device,
567 struct lod_device *lod = dt2lod_dev(dt);
568 struct lustre_cfg_bufs bufs;
569 struct lu_device *next;
570 struct lustre_cfg *lcfg;
576 rc = kstrtouint(buffer, 0, &val);
582 lod->lod_desc.ld_qos_maxage = val;
585 * propogate the value down to OSPs
587 lustre_cfg_bufs_reset(&bufs, NULL);
588 snprintf(str, 32, "%smaxage=%u", PARAM_OSP, val);
589 lustre_cfg_bufs_set_string(&bufs, 1, str);
590 OBD_ALLOC(lcfg, lustre_cfg_len(bufs.lcfg_bufcount, bufs.lcfg_buflen));
593 lustre_cfg_init(lcfg, LCFG_PARAM, &bufs);
595 lod_getref(&lod->lod_ost_descs);
596 lod_foreach_ost(lod, i) {
597 next = &OST_TGT(lod,i)->ltd_ost->dd_lu_dev;
598 rc = next->ld_ops->ldo_process_config(NULL, next, lcfg);
600 CERROR("can't set maxage on #%d: %d\n", i, rc);
602 lod_putref(lod, &lod->lod_ost_descs);
603 OBD_FREE(lcfg, lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens));
607 LUSTRE_RW_ATTR(qos_maxage);
609 static void *lod_osts_seq_start(struct seq_file *p, loff_t *pos)
611 struct obd_device *dev = p->private;
612 struct lod_device *lod;
614 LASSERT(dev != NULL);
615 lod = lu2lod_dev(dev->obd_lu_dev);
617 lod_getref(&lod->lod_ost_descs); /* released in lod_osts_seq_stop */
618 if (*pos >= lod->lod_ost_bitmap->size)
621 *pos = find_next_bit(lod->lod_ost_bitmap->data,
622 lod->lod_ost_bitmap->size, *pos);
623 if (*pos < lod->lod_ost_bitmap->size)
624 return OST_TGT(lod,*pos);
629 static void lod_osts_seq_stop(struct seq_file *p, void *v)
631 struct obd_device *dev = p->private;
632 struct lod_device *lod;
634 LASSERT(dev != NULL);
635 lod = lu2lod_dev(dev->obd_lu_dev);
636 lod_putref(lod, &lod->lod_ost_descs);
639 static void *lod_osts_seq_next(struct seq_file *p, void *v, loff_t *pos)
641 struct obd_device *dev = p->private;
642 struct lod_device *lod = lu2lod_dev(dev->obd_lu_dev);
644 if (*pos >= lod->lod_ost_bitmap->size - 1)
647 *pos = find_next_bit(lod->lod_ost_bitmap->data,
648 lod->lod_ost_bitmap->size, *pos + 1);
649 if (*pos < lod->lod_ost_bitmap->size)
650 return OST_TGT(lod,*pos);
656 * Show active/inactive status for OST found by lod_osts_seq_next().
658 * \param[in] m seq file
659 * \param[in] v unused for single entry
661 * \retval 0 on success
662 * \retval negative error code if failed
664 static int lod_osts_seq_show(struct seq_file *p, void *v)
666 struct obd_device *obd = p->private;
667 struct lod_ost_desc *ost_desc = v;
668 struct lod_device *lod;
670 struct dt_device *next;
671 struct obd_statfs sfs;
673 LASSERT(obd->obd_lu_dev);
674 lod = lu2lod_dev(obd->obd_lu_dev);
676 idx = ost_desc->ltd_index;
677 next = OST_TGT(lod,idx)->ltd_ost;
681 /* XXX: should be non-NULL env, but it's very expensive */
683 rc = dt_statfs(NULL, next, &sfs);
684 if (rc == -ENOTCONN) {
690 seq_printf(p, "%d: %s %sACTIVE\n", idx,
691 obd_uuid2str(&ost_desc->ltd_uuid),
696 static const struct seq_operations lod_osts_sops = {
697 .start = lod_osts_seq_start,
698 .stop = lod_osts_seq_stop,
699 .next = lod_osts_seq_next,
700 .show = lod_osts_seq_show,
703 static int lod_osts_seq_open(struct inode *inode, struct file *file)
705 struct seq_file *seq;
708 rc = seq_open(file, &lod_osts_sops);
712 seq = file->private_data;
713 seq->private = PDE_DATA(inode);
718 * Show whether special failout mode for testing is enabled or not.
720 * \param[in] m seq file
721 * \param[in] v unused for single entry
723 * \retval 0 on success
724 * \retval negative error code if failed
726 static ssize_t lmv_failout_show(struct kobject *kobj, struct attribute *attr,
729 struct dt_device *dt = container_of(kobj, struct dt_device,
731 struct lod_device *lod = dt2lod_dev(dt);
733 return sprintf(buf, "%d\n", lod->lod_lmv_failout ? 1 : 0);
737 * Enable/disable a special failout mode for testing.
739 * This determines whether the LMV will try to continue processing a striped
740 * directory even if it has a (partly) corrupted entry in the master directory,
741 * or if it will abort upon finding a corrupted slave directory entry.
743 * \param[in] file proc file
744 * \param[in] buffer string: 0 or non-zero to disable or enable LMV failout
745 * \param[in] count @buffer length
746 * \param[in] off unused for single entry
748 * \retval @count on success
749 * \retval negative error code if failed
751 static ssize_t lmv_failout_store(struct kobject *kobj, struct attribute *attr,
752 const char *buffer, size_t count)
754 struct dt_device *dt = container_of(kobj, struct dt_device,
756 struct lod_device *lod = dt2lod_dev(dt);
760 rc = kstrtobool(buffer, &val);
764 lod->lod_lmv_failout = val;
768 LUSTRE_RW_ATTR(lmv_failout);
770 static struct lprocfs_vars lprocfs_lod_obd_vars[] = {
771 { .name = "stripesize",
772 .fops = &lod_stripesize_fops },
773 { .name = "qos_threshold_rr",
774 .fops = &lod_qos_thresholdrr_fops },
775 { .name = "dom_stripesize",
776 .fops = &lod_dom_stripesize_fops },
780 static const struct file_operations lod_proc_target_fops = {
781 .owner = THIS_MODULE,
782 .open = lod_osts_seq_open,
785 .release = lprocfs_seq_release,
788 static struct attribute *lod_attrs[] = {
789 &lustre_attr_stripeoffset.attr,
790 &lustre_attr_stripecount.attr,
791 &lustre_attr_stripetype.attr,
792 &lustre_attr_activeobd.attr,
793 &lustre_attr_desc_uuid.attr,
794 &lustre_attr_lmv_failout.attr,
795 &lustre_attr_numobd.attr,
796 &lustre_attr_qos_maxage.attr,
797 &lustre_attr_qos_prio_free.attr,
802 * Initialize procfs entries for LOD.
804 * \param[in] lod LOD device
806 * \retval 0 on success
807 * \retval negative error code if failed
809 int lod_procfs_init(struct lod_device *lod)
811 struct lprocfs_vars ldebugfs_obd_vars[] = { { NULL } };
812 struct obd_device *obd = lod2obd(lod);
813 struct obd_type *type;
817 lod->lod_dt_dev.dd_ktype.default_attrs = lod_attrs;
818 rc = dt_tunables_init(&lod->lod_dt_dev, obd->obd_type, obd->obd_name,
821 CERROR("%s: failed to setup DT tunables: %d\n",
826 obd->obd_vars = lprocfs_lod_obd_vars;
827 obd->obd_proc_entry = lprocfs_register(obd->obd_name,
828 obd->obd_type->typ_procroot,
830 if (IS_ERR(obd->obd_proc_entry)) {
831 rc = PTR_ERR(obd->obd_proc_entry);
832 CERROR("%s: error %d setting up lprocfs\n",
837 rc = lprocfs_seq_create(obd->obd_proc_entry, "target_obd",
838 0444, &lod_proc_target_fops, obd);
840 CWARN("%s: Error adding the target_obd file %d\n",
845 lod->lod_pool_proc_entry = lprocfs_register("pools",
848 if (IS_ERR(lod->lod_pool_proc_entry)) {
849 rc = PTR_ERR(lod->lod_pool_proc_entry);
850 lod->lod_pool_proc_entry = NULL;
851 CWARN("%s: Failed to create pool proc file: %d\n",
856 lov = kset_find_obj(lustre_kset, "lov");
858 CERROR("%s: lov subsystem not found\n", obd->obd_name);
859 GOTO(out, rc = -ENODEV);
862 rc = sysfs_create_link(lov, &lod->lod_dt_dev.dd_kobj,
865 CERROR("%s: failed to create LOV sysfs symlink\n",
869 lod->lod_debugfs = ldebugfs_add_symlink(obd->obd_name, "lov",
870 "../lod/%s", obd->obd_name);
871 if (!lod->lod_debugfs)
872 CERROR("%s: failed to create LOV debugfs symlink\n",
875 type = container_of(lov, struct obd_type, typ_kobj);
876 if (!type->typ_procroot)
879 /* for compatibility we link old procfs's LOV entries to lod ones */
880 lod->lod_symlink = lprocfs_add_symlink(obd->obd_name,
882 "../lod/%s", obd->obd_name);
883 if (lod->lod_symlink == NULL)
884 CERROR("cannot create LOV symlink for /proc/fs/lustre/lod/%s\n",
889 dt_tunables_fini(&lod->lod_dt_dev);
895 * Cleanup procfs entries registred for LOD.
897 * \param[in] lod LOD device
899 void lod_procfs_fini(struct lod_device *lod)
901 struct obd_device *obd = lod2obd(lod);
904 if (lod->lod_symlink != NULL) {
905 lprocfs_remove(&lod->lod_symlink);
906 lod->lod_symlink = NULL;
909 lov = kset_find_obj(lustre_kset, "lov");
911 sysfs_remove_link(lov, obd->obd_name);
915 if (!IS_ERR_OR_NULL(lod->lod_debugfs))
916 ldebugfs_remove(&lod->lod_debugfs);
918 if (obd->obd_proc_entry) {
919 lprocfs_remove(&obd->obd_proc_entry);
920 obd->obd_proc_entry = NULL;
923 dt_tunables_fini(&lod->lod_dt_dev);
926 #endif /* CONFIG_PROC_FS */