summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/vdev_removal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/vdev_removal.c b/module/zfs/vdev_removal.c
index 4ce7b559e..549087163 100644
--- a/module/zfs/vdev_removal.c
+++ b/module/zfs/vdev_removal.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019 by Delphix. All rights reserved.
+ * Copyright (c) 2019, loli10K <[email protected]>. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -1964,6 +1965,9 @@ spa_vdev_remove_top_check(vdev_t *vd)
if (vd != vd->vdev_top)
return (SET_ERROR(ENOTSUP));
+ if (!vdev_is_concrete(vd))
+ return (SET_ERROR(ENOTSUP));
+
if (!spa_feature_is_enabled(spa, SPA_FEATURE_DEVICE_REMOVAL))
return (SET_ERROR(ENOTSUP));