Skip to content

Commit b5d2f8d

Browse files
committed
Fix decrypt_fault.ksh when zfs_abd_scatter_enabled=0
If we turn off zfs_abd_scatter_enabled, we can allow buffer sharing during arc_write_ready. However, this will cause decrypt_fault.ksh to fail. It seems we need to export the pool to guarantee we will attempt to decrypt the file again so fault injection will work. Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
1 parent a497c5f commit b5d2f8d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/zfs-tests/tests/functional/fault/decrypt_fault.ksh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@ log_must eval "echo 'password' | zfs create -o encryption=on \
4747
mntpt=$(get_prop mountpoint $TESTPOOL/fs)
4848
log_must mkfile 32M $mntpt/file1
4949

50-
log_must zinject -a -t data -e decrypt -f 20 $mntpt/file1
51-
log_must zfs umount $TESTPOOL/fs
50+
# Remember guid to reimport so we don't import wrong pool
51+
guid="$(zpool get guid $TESTPOOL -Ho value)"
52+
# Reimport the pool to clear cache
53+
log_must zpool export $TESTPOOL
54+
log_must zpool import "$guid"
55+
log_must eval "echo 'password' | zfs load-key $TESTPOOL/fs"
5256
log_must zfs mount $TESTPOOL/fs
57+
log_must zinject -a -t data -e decrypt -f 20 $mntpt/file1
5358

5459
log_mustnot eval "cat $mntpt/file1 > /dev/null"
5560
# Events are not supported on FreeBSD

0 commit comments

Comments
 (0)