]> git.proxmox.com Git - mirror_zfs.git/commit
nopwrites on dmu_sync-ed blocks can result in a panic
authorGeorge Wilson <george.wilson@delphix.com>
Sat, 3 Dec 2022 01:45:33 +0000 (19:45 -0600)
committerGitHub <noreply@github.com>
Sat, 3 Dec 2022 01:45:33 +0000 (17:45 -0800)
commitd7cf06a25d296a764c8548a02d96c3848e1f2141
tree012b728f59859befaae4881e9908a3c3f7177b75
parent2c590bdede78c5aca10c0cf4284b59c006f4a30d
nopwrites on dmu_sync-ed blocks can result in a panic

After a device has been removed, any nopwrites for blocks on that
indirect vdev should be ignored and a new block should be allocated. The
original code attempted to handle this but used the wrong block pointer
when checking for indirect vdevs and failed to check all DVAs.

This change corrects both of these issues and modifies the test case
to ensure that it properly tests nopwrites with device removal.

Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Wilson <gwilson@delphix.com>
Closes #14235
module/zfs/zio.c
tests/zfs-tests/tests/functional/nopwrite/nopwrite.shlib
tests/zfs-tests/tests/functional/removal/removal_nopwrite.ksh