Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107425710
D46866.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D46866.diff
View Options
diff --git a/cddl/usr.sbin/zfsd/case_file.cc b/cddl/usr.sbin/zfsd/case_file.cc
--- a/cddl/usr.sbin/zfsd/case_file.cc
+++ b/cddl/usr.sbin/zfsd/case_file.cc
@@ -288,7 +288,7 @@
return (/*consumed*/false);
}
- if (VdevState() > VDEV_STATE_CANT_OPEN) {
+ if (VdevState() > VDEV_STATE_FAULTED) {
/*
* For now, newly discovered devices only help for
* devices that are missing. In the future, we might
diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib b/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib
--- a/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib
+++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd.kshlib
@@ -52,7 +52,7 @@
function wait_for_pool_removal
{
typeset -i timeout=$1
- wait_for_pool_dev_state_change $timeout $REMOVAL_DISK "REMOVED|UNAVAIL"
+ wait_for_pool_dev_state_change $timeout $REMOVAL_DISK "REMOVED|UNAVAIL|FAULTED"
}
function wait_until_scrubbed
diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_003_pos.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_003_pos.ksh
--- a/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_003_pos.ksh
+++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_autoreplace_003_pos.ksh
@@ -83,19 +83,25 @@
typeset OTHER_DISKS="${DISK1} ${DISK2}"
typeset OTHER_NOPS=${OTHER_DISKS//~(E)([[:space:]]+|$)/.nop\1}
set -A MY_KEYWORDS "mirror" "raidz1" "raidz2"
+set -A MY_FAILURES "FAULTED" "REMOVED"
ensure_zfsd_running
log_must create_gnops $OTHER_DISKS $SPARE_DISK
-for keyword in "${MY_KEYWORDS[@]}" ; do
- log_must create_gnop $REMOVAL_DISK $PHYSPATH
- log_must create_pool $TESTPOOL $keyword $REMOVAL_NOP $OTHER_NOPS spare $SPARE_NOP
- log_must $ZPOOL set autoreplace=on $TESTPOOL
+for failure in "${MY_FAILURES[@]}" ; do
+ for keyword in "${MY_KEYWORDS[@]}" ; do
+ log_must create_gnop $REMOVAL_DISK $PHYSPATH
+ log_must create_pool $TESTPOOL $keyword $REMOVAL_NOP $OTHER_NOPS spare $SPARE_NOP
+ log_must $ZPOOL set autoreplace=on $TESTPOOL
- log_must destroy_gnop $REMOVAL_DISK
- log_must wait_for_pool_removal 20
- log_must create_gnop $NEW_DISK $PHYSPATH
- verify_assertion
- destroy_pool "$TESTPOOL"
- log_must destroy_gnop $NEW_DISK
+ if [ $failure = "FAULTED" ]; then
+ log_must zinject -d $REMOVAL_NOP -A fault $TESTPOOL
+ fi
+ log_must destroy_gnop $REMOVAL_DISK
+ log_must wait_for_pool_removal 20
+ log_must create_gnop $NEW_DISK $PHYSPATH
+ verify_assertion
+ destroy_pool "$TESTPOOL"
+ log_must destroy_gnop $NEW_DISK
+ done
done
log_pass
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 15, 12:05 AM (9 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15803006
Default Alt Text
D46866.diff (2 KB)
Attached To
Mode
D46866: Fix zfsd so it checks FAULTED vdevs
Attached
Detach File
Event Timeline
Log In to Comment