mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-28 06:00:44 +00:00
Don't try to get mg of hole vdev in removal
Don't try to get mg of hole vdev in removal Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Closes #17080
This commit is contained in:
parent
383256c329
commit
7e72312eff
@ -209,8 +209,8 @@ vdev_passivate(vdev_t *vd, uint64_t *txg)
|
||||
for (uint64_t id = 0; id < rvd->vdev_children; id++) {
|
||||
vdev_t *cvd = rvd->vdev_child[id];
|
||||
|
||||
if (cvd == vd ||
|
||||
cvd->vdev_ops == &vdev_indirect_ops)
|
||||
if (cvd == vd || !vdev_is_concrete(cvd) ||
|
||||
vdev_is_dead(cvd))
|
||||
continue;
|
||||
|
||||
metaslab_class_t *mc = cvd->vdev_mg->mg_class;
|
||||
|
@ -887,7 +887,8 @@ tests = ['removal_all_vdev', 'removal_cancel', 'removal_check_space',
|
||||
'removal_with_send_recv', 'removal_with_snapshot',
|
||||
'removal_with_write', 'removal_with_zdb', 'remove_expanded',
|
||||
'remove_mirror', 'remove_mirror_sanity', 'remove_raidz',
|
||||
'remove_indirect', 'remove_attach_mirror', 'removal_reservation']
|
||||
'remove_indirect', 'remove_attach_mirror', 'removal_reservation',
|
||||
'removal_with_hole']
|
||||
tags = ['functional', 'removal']
|
||||
|
||||
[tests/functional/rename_dirs]
|
||||
|
@ -1852,6 +1852,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
|
||||
functional/removal/removal_with_export.ksh \
|
||||
functional/removal/removal_with_faulted.ksh \
|
||||
functional/removal/removal_with_ganging.ksh \
|
||||
functional/removal/removal_with_hole.ksh \
|
||||
functional/removal/removal_with_indirect.ksh \
|
||||
functional/removal/removal_with_remove.ksh \
|
||||
functional/removal/removal_with_scrub.ksh \
|
||||
|
34
tests/zfs-tests/tests/functional/removal/removal_with_hole.ksh
Executable file
34
tests/zfs-tests/tests/functional/removal/removal_with_hole.ksh
Executable file
@ -0,0 +1,34 @@
|
||||
#! /bin/ksh -p
|
||||
#
|
||||
# CDDL HEADER START
|
||||
#
|
||||
# This file and its contents are supplied under the terms of the
|
||||
# Common Development and Distribution License ("CDDL"), version 1.0.
|
||||
# You may only use this file in accordance with the terms of version
|
||||
# 1.0 of the CDDL.
|
||||
#
|
||||
# A full copy of the text of the CDDL should have accompanied this
|
||||
# source. A copy of the CDDL is also available via the Internet at
|
||||
# http://www.illumos.org/license/CDDL.
|
||||
#
|
||||
# CDDL HEADER END
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2025 by Klara Inc.
|
||||
#
|
||||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/functional/removal/removal.kshlib
|
||||
|
||||
log_onexit default_cleanup_noexit
|
||||
DISK1="$(echo $DISKS | cut -d' ' -f1)"
|
||||
DISK2="$(echo $DISKS | cut -d' ' -f2)"
|
||||
DISK3="$(echo $DISKS | cut -d' ' -f3)"
|
||||
|
||||
log_must zpool create $TESTPOOL $DISK1 log $DISK2
|
||||
log_must zpool add $TESTPOOL $DISK3
|
||||
log_must zpool remove $TESTPOOL $DISK2
|
||||
log_must zpool remove $TESTPOOL $DISK1
|
||||
|
||||
log_pass "Removal with a hole as the first other device doesn't panic."
|
Loading…
Reference in New Issue
Block a user