zpool: allow split with whole-disk devices

This change allows 'zpool split' to work with whole-disk devices and
updates the ZFS Test Suite with a new script to exercise this
functionality.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6643 
Closes #8133
This commit is contained in:
LOLi
2018-11-20 19:22:53 +01:00
committed by Brian Behlendorf
parent bd9c195805
commit 0cd5c941d0
11 changed files with 116 additions and 4 deletions
+1 -1
View File
@@ -1286,7 +1286,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
* symbolic link will be removed, partition table created,
* and then block until udev creates the new link.
*/
if (!is_exclusive || !is_spare(NULL, udevpath)) {
if (!is_exclusive && !is_spare(NULL, udevpath)) {
char *devnode = strrchr(devpath, '/') + 1;
ret = strncmp(udevpath, UDISK_ROOT, strlen(UDISK_ROOT));