]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Cleanup dead spa_boot code
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Tue, 13 Sep 2022 23:40:10 +0000 (19:40 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Sep 2022 23:40:10 +0000 (16:40 -0700)
Unused code detected by coverity.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13868

include/Makefile.am
include/sys/spa_boot.h [deleted file]
lib/libzpool/Makefile.am
module/Kbuild.in
module/Makefile.bsd
module/os/freebsd/zfs/spa_os.c
module/os/freebsd/zfs/zfs_vfsops.c
module/os/linux/zfs/zfs_vfsops.c
module/zfs/spa.c
module/zfs/spa_boot.c [deleted file]

index 1a7f67e9c4405c8e7f9c480e58bd10135b8d2b02..19726bba18643aecf14ed6609804d8a80c2538ab 100644 (file)
@@ -76,7 +76,6 @@ COMMON_H = \
        sys/sa_impl.h \
        sys/skein.h \
        sys/spa.h \
-       sys/spa_boot.h \
        sys/spa_checkpoint.h \
        sys/spa_checksum.h \
        sys/spa_impl.h \
diff --git a/include/sys/spa_boot.h b/include/sys/spa_boot.h
deleted file mode 100644 (file)
index 4a69efd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or https://opensource.org/licenses/CDDL-1.0.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SYS_SPA_BOOT_H
-#define        _SYS_SPA_BOOT_H
-
-#include <sys/nvpair.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern char *spa_get_bootprop(char *prop);
-extern void spa_free_bootprop(char *prop);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYS_SPA_BOOT_H */
index eaa920e5610631bef4b3c3fb05ce90d0d0a35c03..0cc1997f7a99b07ed175306c323003a436b31e90 100644 (file)
@@ -121,7 +121,6 @@ nodist_libzpool_la_SOURCES = \
        module/zfs/sha256.c \
        module/zfs/skein_zfs.c \
        module/zfs/spa.c \
-       module/zfs/spa_boot.c \
        module/zfs/spa_checkpoint.c \
        module/zfs/spa_config.c \
        module/zfs/spa_errlog.c \
index 4803952cbfedbfec7c078760e80793d2379661e6..7a20e6ee4615d51a47ca3692c8febfa69aad1c32 100644 (file)
@@ -345,7 +345,6 @@ ZFS_OBJS := \
        sha256.o \
        skein_zfs.o \
        spa.o \
-       spa_boot.o \
        spa_checkpoint.o \
        spa_config.o \
        spa_errlog.o \
index 050b6c21e5eb2e0e3a99b5da676198a2516184a1..8829ad9421306d4ce34843f18b553ddf6b8c1981 100644 (file)
@@ -271,7 +271,6 @@ SRCS+=      abd.c \
        sha256.c \
        skein_zfs.c \
        spa.c \
-       spa_boot.c \
        spa_checkpoint.c \
        spa_config.c \
        spa_errlog.c \
index 251fafcc964e72fb4baee74a14e4c376eb7eba53..9bc61a6c8fe5cb51de8510cbc4f7f40c51892947 100644 (file)
@@ -58,7 +58,6 @@
 #include <sys/fs/zfs.h>
 #include <sys/arc.h>
 #include <sys/callb.h>
-#include <sys/spa_boot.h>
 #include <sys/zfs_ioctl.h>
 #include <sys/dsl_scan.h>
 #include <sys/dmu_send.h>
index 4e4a5f8d215841a5f7227f05f4df02dc3a4844d9..8b60b34d85cea1f2a16e72cddc4890dbdb950131 100644 (file)
@@ -62,7 +62,6 @@
 #include <sys/sunddi.h>
 #include <sys/dmu_objset.h>
 #include <sys/dsl_dir.h>
-#include <sys/spa_boot.h>
 #include <sys/jail.h>
 #include <ufs/ufs/quota.h>
 #include <sys/zfs_quota.h>
index eac3dcb6a55c93f4096daebdbd28a47919c6933f..d0575fe5e9897d27e8fa2160f1c35bf0b1875ad3 100644 (file)
@@ -56,7 +56,6 @@
 #include <sys/sunddi.h>
 #include <sys/dmu_objset.h>
 #include <sys/dsl_dir.h>
-#include <sys/spa_boot.h>
 #include <sys/objlist.h>
 #include <sys/zpl.h>
 #include <linux/vfs_compat.h>
index b2b59af42947b3ba55b04468500e684216853ebc..eeec3b6be9cae465b987832e98dcd4d7d75c8fd9 100644 (file)
@@ -81,7 +81,6 @@
 #include <sys/arc.h>
 #include <sys/callb.h>
 #include <sys/systeminfo.h>
-#include <sys/spa_boot.h>
 #include <sys/zfs_ioctl.h>
 #include <sys/dsl_scan.h>
 #include <sys/zfeature.h>
diff --git a/module/zfs/spa_boot.c b/module/zfs/spa_boot.c
deleted file mode 100644 (file)
index fddb5c3..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or https://opensource.org/licenses/CDDL-1.0.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifdef _KERNEL
-
-#include <sys/zio.h>
-#include <sys/spa_boot.h>
-#include <sys/sunddi.h>
-
-char *
-spa_get_bootprop(char *propname)
-{
-       char *value;
-
-       if (ddi_prop_lookup_string(DDI_DEV_T_ANY, ddi_root_node(),
-           DDI_PROP_DONTPASS, propname, &value) != DDI_SUCCESS)
-               return (NULL);
-       return (value);
-}
-
-void
-spa_free_bootprop(char *value)
-{
-       ddi_prop_free(value);
-}
-
-#endif /* _KERNEL */