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 = kstrtouint(buffer, 0, &stripe_count);
332 lod_fix_desc_stripe_count(&stripe_count);
333 lod->lod_desc.ld_default_stripe_count = stripe_count;
337 LUSTRE_RW_ATTR(stripecount);
340 * Show number of targets.
342 * \param[in] m seq file
343 * \param[in] v unused for single entry
345 * \retval 0 on success
346 * \retval negative error code if failed
348 static ssize_t numobd_show(struct kobject *kobj, struct attribute *attr,
351 struct dt_device *dt = container_of(kobj, struct dt_device,
353 struct lod_device *lod = dt2lod_dev(dt);
355 return sprintf(buf, "%u\n", lod->lod_desc.ld_tgt_count);
357 LUSTRE_RO_ATTR(numobd);
360 * Show number of active targets.
362 * \param[in] m seq file
363 * \param[in] v unused for single entry
365 * \retval 0 on success
366 * \retval negative error code if failed
368 static ssize_t activeobd_show(struct kobject *kobj, struct attribute *attr,
371 struct dt_device *dt = container_of(kobj, struct dt_device,
373 struct lod_device *lod = dt2lod_dev(dt);
375 return sprintf(buf, "%u\n", lod->lod_desc.ld_active_tgt_count);
377 LUSTRE_RO_ATTR(activeobd);
380 * Show UUID of LOD device.
382 * \param[in] m seq file
383 * \param[in] v unused for single entry
385 * \retval 0 on success
386 * \retval negative error code if failed
388 static ssize_t desc_uuid_show(struct kobject *kobj, struct attribute *attr,
391 struct dt_device *dt = container_of(kobj, struct dt_device,
393 struct lod_device *lod = dt2lod_dev(dt);
395 return sprintf(buf, "%s\n", lod->lod_desc.ld_uuid.uuid);
397 LUSTRE_RO_ATTR(desc_uuid);
400 * Show QoS priority parameter.
402 * The printed value is a percentage value (0-100%) indicating the priority
403 * of free space compared to performance. 0% means select OSTs equally
404 * regardless of their free space, 100% means select OSTs only by their free
405 * space even if it results in very imbalanced load on the OSTs.
407 * \param[in] m seq file
408 * \param[in] v unused for single entry
410 * \retval 0 on success
411 * \retval negative error code if failed
413 static ssize_t qos_prio_free_show(struct kobject *kobj, struct attribute *attr,
416 struct dt_device *dt = container_of(kobj, struct dt_device,
418 struct lod_device *lod = dt2lod_dev(dt);
420 return sprintf(buf, "%d%%\n",
421 (lod->lod_qos.lq_prio_free * 100 + 255) >> 8);
425 * Set QoS free space priority parameter.
427 * Set the relative priority of free OST space compared to OST load when OSTs
428 * are space imbalanced. See lod_qos_priofree_seq_show() for description of
429 * this parameter. See lod_qos_thresholdrr_seq_write() and lq_threshold_rr to
430 * determine what constitutes "space imbalanced" OSTs.
432 * \param[in] file proc file
433 * \param[in] buffer string which contains the free space priority (0-100)
434 * \param[in] count @buffer length
435 * \param[in] off unused for single entry
437 * \retval @count on success
438 * \retval negative error code if failed
440 static ssize_t qos_prio_free_store(struct kobject *kobj, struct attribute *attr,
441 const char *buffer, size_t count)
443 struct dt_device *dt = container_of(kobj, struct dt_device,
445 struct lod_device *lod = dt2lod_dev(dt);
449 rc = kstrtouint(buffer, 0, &val);
455 lod->lod_qos.lq_prio_free = (val << 8) / 100;
456 lod->lod_qos.lq_dirty = 1;
457 lod->lod_qos.lq_reset = 1;
461 LUSTRE_RW_ATTR(qos_prio_free);
464 * Show threshold for "same space on all OSTs" rule.
466 * \param[in] m seq file
467 * \param[in] v unused for single entry
469 * \retval 0 on success
470 * \retval negative error code if failed
472 static int lod_qos_thresholdrr_seq_show(struct seq_file *m, void *v)
474 struct obd_device *dev = m->private;
475 struct lod_device *lod;
477 LASSERT(dev != NULL);
478 lod = lu2lod_dev(dev->obd_lu_dev);
479 seq_printf(m, "%d%%\n",
480 (lod->lod_qos.lq_threshold_rr * 100 + 255) >> 8);
485 * Set threshold for "same space on all OSTs" rule.
487 * This sets the maximum percentage difference of free space between the most
488 * full and most empty OST in the currently available OSTs. If this percentage
489 * is exceeded, use the QoS allocator to select OSTs based on their available
490 * space so that more full OSTs are chosen less often, otherwise use the
491 * round-robin allocator for efficiency and performance.
493 * \param[in] file proc file
494 * \param[in] buffer string containing percentage difference of free space
495 * \param[in] count @buffer length
496 * \param[in] off unused for single entry
498 * \retval @count on success
499 * \retval negative error code if failed
502 lod_qos_thresholdrr_seq_write(struct file *file, const char __user *buffer,
503 size_t count, loff_t *off)
505 struct seq_file *m = file->private_data;
506 struct obd_device *dev = m->private;
507 struct lod_device *lod;
511 LASSERT(dev != NULL);
512 lod = lu2lod_dev(dev->obd_lu_dev);
514 rc = lprocfs_str_with_units_to_s64(buffer, count, &val, '%');
518 if (val > 100 || val < 0)
521 lod->lod_qos.lq_threshold_rr = (val << 8) / 100;
522 lod->lod_qos.lq_dirty = 1;
526 LPROC_SEQ_FOPS(lod_qos_thresholdrr);
529 * Show expiration period used to refresh cached statfs data, which
530 * is used to implement QoS/RR striping allocation algorithm.
532 * \param[in] m seq file
533 * \param[in] v unused for single entry
535 * \retval 0 on success
536 * \retval negative error code if failed
538 static ssize_t qos_maxage_show(struct kobject *kobj, struct attribute *attr,
541 struct dt_device *dt = container_of(kobj, struct dt_device,
543 struct lod_device *lod = dt2lod_dev(dt);
545 return sprintf(buf, "%u Sec\n", lod->lod_desc.ld_qos_maxage);
549 * Set expiration period used to refresh cached statfs data.
551 * \param[in] file proc file
552 * \param[in] buffer string contains maximum age of statfs data in seconds
553 * \param[in] count @buffer length
554 * \param[in] off unused for single entry
556 * \retval @count on success
557 * \retval negative error code if failed
559 static ssize_t qos_maxage_store(struct kobject *kobj, struct attribute *attr,
560 const char *buffer, size_t count)
562 struct dt_device *dt = container_of(kobj, struct dt_device,
564 struct lod_device *lod = dt2lod_dev(dt);
565 struct lustre_cfg_bufs bufs;
566 struct lu_device *next;
567 struct lustre_cfg *lcfg;
573 rc = kstrtouint(buffer, 0, &val);
579 lod->lod_desc.ld_qos_maxage = val;
582 * propogate the value down to OSPs
584 lustre_cfg_bufs_reset(&bufs, NULL);
585 snprintf(str, 32, "%smaxage=%u", PARAM_OSP, val);
586 lustre_cfg_bufs_set_string(&bufs, 1, str);
587 OBD_ALLOC(lcfg, lustre_cfg_len(bufs.lcfg_bufcount, bufs.lcfg_buflen));
590 lustre_cfg_init(lcfg, LCFG_PARAM, &bufs);
592 lod_getref(&lod->lod_ost_descs);
593 lod_foreach_ost(lod, i) {
594 next = &OST_TGT(lod,i)->ltd_ost->dd_lu_dev;
595 rc = next->ld_ops->ldo_process_config(NULL, next, lcfg);
597 CERROR("can't set maxage on #%d: %d\n", i, rc);
599 lod_putref(lod, &lod->lod_ost_descs);
600 OBD_FREE(lcfg, lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens));
604 LUSTRE_RW_ATTR(qos_maxage);
606 static void *lod_osts_seq_start(struct seq_file *p, loff_t *pos)
608 struct obd_device *dev = p->private;
609 struct lod_device *lod;
611 LASSERT(dev != NULL);
612 lod = lu2lod_dev(dev->obd_lu_dev);
614 lod_getref(&lod->lod_ost_descs); /* released in lod_osts_seq_stop */
615 if (*pos >= lod->lod_ost_bitmap->size)
618 *pos = find_next_bit(lod->lod_ost_bitmap->data,
619 lod->lod_ost_bitmap->size, *pos);
620 if (*pos < lod->lod_ost_bitmap->size)
621 return OST_TGT(lod,*pos);
626 static void lod_osts_seq_stop(struct seq_file *p, void *v)
628 struct obd_device *dev = p->private;
629 struct lod_device *lod;
631 LASSERT(dev != NULL);
632 lod = lu2lod_dev(dev->obd_lu_dev);
633 lod_putref(lod, &lod->lod_ost_descs);
636 static void *lod_osts_seq_next(struct seq_file *p, void *v, loff_t *pos)
638 struct obd_device *dev = p->private;
639 struct lod_device *lod = lu2lod_dev(dev->obd_lu_dev);
641 if (*pos >= lod->lod_ost_bitmap->size - 1)
644 *pos = find_next_bit(lod->lod_ost_bitmap->data,
645 lod->lod_ost_bitmap->size, *pos + 1);
646 if (*pos < lod->lod_ost_bitmap->size)
647 return OST_TGT(lod,*pos);
653 * Show active/inactive status for OST found by lod_osts_seq_next().
655 * \param[in] m seq file
656 * \param[in] v unused for single entry
658 * \retval 0 on success
659 * \retval negative error code if failed
661 static int lod_osts_seq_show(struct seq_file *p, void *v)
663 struct obd_device *obd = p->private;
664 struct lod_ost_desc *ost_desc = v;
665 struct lod_device *lod;
667 struct dt_device *next;
668 struct obd_statfs sfs;
670 LASSERT(obd->obd_lu_dev);
671 lod = lu2lod_dev(obd->obd_lu_dev);
673 idx = ost_desc->ltd_index;
674 next = OST_TGT(lod,idx)->ltd_ost;
678 /* XXX: should be non-NULL env, but it's very expensive */
680 rc = dt_statfs(NULL, next, &sfs);
681 if (rc == -ENOTCONN) {
687 seq_printf(p, "%d: %s %sACTIVE\n", idx,
688 obd_uuid2str(&ost_desc->ltd_uuid),
693 static const struct seq_operations lod_osts_sops = {
694 .start = lod_osts_seq_start,
695 .stop = lod_osts_seq_stop,
696 .next = lod_osts_seq_next,
697 .show = lod_osts_seq_show,
700 static int lod_osts_seq_open(struct inode *inode, struct file *file)
702 struct seq_file *seq;
705 rc = seq_open(file, &lod_osts_sops);
709 seq = file->private_data;
710 seq->private = PDE_DATA(inode);
715 * Show whether special failout mode for testing is enabled or not.
717 * \param[in] m seq file
718 * \param[in] v unused for single entry
720 * \retval 0 on success
721 * \retval negative error code if failed
723 static ssize_t lmv_failout_show(struct kobject *kobj, struct attribute *attr,
726 struct dt_device *dt = container_of(kobj, struct dt_device,
728 struct lod_device *lod = dt2lod_dev(dt);
730 return sprintf(buf, "%d\n", lod->lod_lmv_failout ? 1 : 0);
734 * Enable/disable a special failout mode for testing.
736 * This determines whether the LMV will try to continue processing a striped
737 * directory even if it has a (partly) corrupted entry in the master directory,
738 * or if it will abort upon finding a corrupted slave directory entry.
740 * \param[in] file proc file
741 * \param[in] buffer string: 0 or non-zero to disable or enable LMV failout
742 * \param[in] count @buffer length
743 * \param[in] off unused for single entry
745 * \retval @count on success
746 * \retval negative error code if failed
748 static ssize_t lmv_failout_store(struct kobject *kobj, struct attribute *attr,
749 const char *buffer, size_t count)
751 struct dt_device *dt = container_of(kobj, struct dt_device,
753 struct lod_device *lod = dt2lod_dev(dt);
757 rc = kstrtobool(buffer, &val);
761 lod->lod_lmv_failout = val;
765 LUSTRE_RW_ATTR(lmv_failout);
767 static struct lprocfs_vars lprocfs_lod_obd_vars[] = {
768 { .name = "stripesize",
769 .fops = &lod_stripesize_fops },
770 { .name = "qos_threshold_rr",
771 .fops = &lod_qos_thresholdrr_fops },
772 { .name = "dom_stripesize",
773 .fops = &lod_dom_stripesize_fops },
777 static const struct file_operations lod_proc_target_fops = {
778 .owner = THIS_MODULE,
779 .open = lod_osts_seq_open,
782 .release = lprocfs_seq_release,
785 static struct attribute *lod_attrs[] = {
786 &lustre_attr_stripeoffset.attr,
787 &lustre_attr_stripecount.attr,
788 &lustre_attr_stripetype.attr,
789 &lustre_attr_activeobd.attr,
790 &lustre_attr_desc_uuid.attr,
791 &lustre_attr_lmv_failout.attr,
792 &lustre_attr_numobd.attr,
793 &lustre_attr_qos_maxage.attr,
794 &lustre_attr_qos_prio_free.attr,
799 * Initialize procfs entries for LOD.
801 * \param[in] lod LOD device
803 * \retval 0 on success
804 * \retval negative error code if failed
806 int lod_procfs_init(struct lod_device *lod)
808 struct obd_device *obd = lod2obd(lod);
809 struct proc_dir_entry *lov_proc_dir;
810 struct obd_type *type;
814 lod->lod_dt_dev.dd_ktype.default_attrs = lod_attrs;
815 rc = dt_tunables_init(&lod->lod_dt_dev, obd->obd_type, obd->obd_name,
818 CERROR("%s: failed to setup DT tunables: %d\n",
823 obd->obd_vars = lprocfs_lod_obd_vars;
824 obd->obd_proc_entry = lprocfs_register(obd->obd_name,
825 obd->obd_type->typ_procroot,
827 if (IS_ERR(obd->obd_proc_entry)) {
828 rc = PTR_ERR(obd->obd_proc_entry);
829 CERROR("%s: error %d setting up lprocfs\n",
834 rc = lprocfs_seq_create(obd->obd_proc_entry, "target_obd",
835 0444, &lod_proc_target_fops, obd);
837 CWARN("%s: Error adding the target_obd file %d\n",
842 lod->lod_pool_proc_entry = lprocfs_register("pools",
845 if (IS_ERR(lod->lod_pool_proc_entry)) {
846 rc = PTR_ERR(lod->lod_pool_proc_entry);
847 lod->lod_pool_proc_entry = NULL;
848 CWARN("%s: Failed to create pool proc file: %d\n",
853 lov = kset_find_obj(lustre_kset, "lov");
855 rc = sysfs_create_link(lov, &lod->lod_dt_dev.dd_kobj,
860 lod->lod_debugfs = ldebugfs_add_symlink(obd->obd_name, "lov",
861 "../lod/%s", obd->obd_name);
862 if (!lod->lod_debugfs)
863 CERROR("%s: failed to create LOV debugfs symlink\n",
866 /* If the real LOV is present which is the case for setups
867 * with both server and clients on the same node then use
868 * the LOV's proc root */
869 type = class_search_type(LUSTRE_LOV_NAME);
870 if (type != NULL && type->typ_procroot != NULL)
871 lov_proc_dir = type->typ_procroot;
873 lov_proc_dir = obd->obd_type->typ_procsym;
875 if (lov_proc_dir == NULL)
878 /* for compatibility we link old procfs's LOV entries to lod ones */
879 lod->lod_symlink = lprocfs_add_symlink(obd->obd_name, lov_proc_dir,
880 "../lod/%s", obd->obd_name);
881 if (lod->lod_symlink == NULL)
882 CERROR("cannot create LOV symlink for /proc/fs/lustre/lod/%s\n",
887 dt_tunables_fini(&lod->lod_dt_dev);
893 * Cleanup procfs entries registred for LOD.
895 * \param[in] lod LOD device
897 void lod_procfs_fini(struct lod_device *lod)
899 struct obd_device *obd = lod2obd(lod);
902 if (lod->lod_symlink != NULL) {
903 lprocfs_remove(&lod->lod_symlink);
904 lod->lod_symlink = NULL;
907 lov = kset_find_obj(lustre_kset, "lov");
909 sysfs_remove_link(lov, obd->obd_name);
913 if (!IS_ERR_OR_NULL(lod->lod_debugfs))
914 ldebugfs_remove(&lod->lod_debugfs);
916 if (obd->obd_proc_entry) {
917 lprocfs_remove(&obd->obd_proc_entry);
918 obd->obd_proc_entry = NULL;
921 dt_tunables_fini(&lod->lod_dt_dev);
924 #endif /* CONFIG_PROC_FS */