aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2020-06-16 11:41:45 -0700
committerGitHub <[email protected]>2020-06-16 11:41:45 -0700
commitba54b180a5b496af29f8dd6eada3f0bd82d9b883 (patch)
tree50e4580c5b23ce4988b67f2597fbc0577ae8b2c9
parent0a03495e3ee75b3457181910081e809dda80cec0 (diff)
Remove refences to blacklist/whitelist
These terms reinforce the incorrect notion that black is bad and white is good. Replace this language with more specific terms which are also more clear and don't rely on metaphor. Specifically: * When vdevs are specified on the command line, they are the "selected" vdevs. * Entries in /dev/ which should not be considered as possible disks are "excluded" devices. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Wilson <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #10457
-rw-r--r--cmd/zpool/zpool_iter.c4
-rw-r--r--cmd/zpool/zpool_util.h2
-rw-r--r--lib/libzutil/os/freebsd/zutil_import_os.c20
3 files changed, 13 insertions, 13 deletions
diff --git a/cmd/zpool/zpool_iter.c b/cmd/zpool/zpool_iter.c
index 9927a9deb..5f3153bca 100644
--- a/cmd/zpool/zpool_iter.c
+++ b/cmd/zpool/zpool_iter.c
@@ -616,7 +616,7 @@ for_each_vdev_run_cb(zpool_handle_t *zhp, nvlist_t *nv, void *cb_vcdl)
}
}
- /* Check for whitelisted vdevs here, if any */
+ /* Check for selected vdevs here, if any */
for (i = 0; i < vcdl->vdev_names_count; i++) {
vname = zpool_vdev_name(g_zfs, zhp, nv, vcdl->cb_name_flags);
if (strcmp(vcdl->vdev_names[i], vname) == 0) {
@@ -627,7 +627,7 @@ for_each_vdev_run_cb(zpool_handle_t *zhp, nvlist_t *nv, void *cb_vcdl)
free(vname);
}
- /* If we whitelisted vdevs, and this isn't one of them, then bail out */
+ /* If we selected vdevs, and this isn't one of them, then bail out */
if (!match && vcdl->vdev_names_count)
return (0);
diff --git a/cmd/zpool/zpool_util.h b/cmd/zpool/zpool_util.h
index 1f23f61aa..265aa5895 100644
--- a/cmd/zpool/zpool_util.h
+++ b/cmd/zpool/zpool_util.h
@@ -103,7 +103,7 @@ typedef struct vdev_cmd_data_list
char *cmd; /* Command to run */
unsigned int count; /* Number of vdev_cmd_data items (vdevs) */
- /* vars to whitelist only certain vdevs, if requested */
+ /* fields used to select only certain vdevs, if requested */
libzfs_handle_t *g_zfs;
char **vdev_names;
int vdev_names_count;
diff --git a/lib/libzutil/os/freebsd/zutil_import_os.c b/lib/libzutil/os/freebsd/zutil_import_os.c
index 7272a1e0e..6cb001eac 100644
--- a/lib/libzutil/os/freebsd/zutil_import_os.c
+++ b/lib/libzutil/os/freebsd/zutil_import_os.c
@@ -88,13 +88,13 @@ update_vdev_config_dev_strs(nvlist_t *nv)
/*
* Do not even look at these devices.
*/
-static const char * const blacklist_devs[] = {
+static const char * const excluded_devs[] = {
"nfslock",
"sequencer",
"zfs",
};
-#define BLACKLIST_DIR "/dev/"
-#define BLACKLIST_DIR_LEN 5
+#define EXCLUDED_DIR "/dev/"
+#define EXCLUDED_DIR_LEN 5
void
zpool_open_func(void *arg)
@@ -108,14 +108,14 @@ zpool_open_func(void *arg)
off_t mediasize = 0;
/*
- * Do not even look at blacklisted devices.
+ * Do not even look at excluded devices.
*/
- if (strncmp(rn->rn_name, BLACKLIST_DIR, BLACKLIST_DIR_LEN) == 0) {
- char *name = rn->rn_name + BLACKLIST_DIR_LEN;
- for (i = 0; i < nitems(blacklist_devs); ++i) {
- const char *badname = blacklist_devs[i];
- size_t len = strlen(badname);
- if (strncmp(name, badname, len) == 0) {
+ if (strncmp(rn->rn_name, EXCLUDED_DIR, EXCLUDED_DIR_LEN) == 0) {
+ char *name = rn->rn_name + EXCLUDED_DIR_LEN;
+ for (i = 0; i < nitems(excluded_devs); ++i) {
+ const char *excluded_name = excluded_devs[i];
+ size_t len = strlen(excluded_name);
+ if (strncmp(name, excluded_name, len) == 0) {
return;
}
}