zfs/module
Akash B c2f0aaeb3c Fix concurrent resilvers initiated at same time
For draid vdevs it was possible to initiate both the
sequential and healing resilver at same time.

This fixes the following two scenarios.
     1) There's a window where a sequential rebuild can
be started via ZED even if a healing resilver has been
scheduled.
	- This is fixed by adding additional check in
spa_vdev_attach() for any scheduled resilver and return
appropriate error code when a resilver is already in
progress.

     2) It was possible for zpool clear to start a healing
resilver when it wasn't needed at all. This occurs because
during a vdev_open() the device is presumed to be healthy not
until the device is validated by vdev_validate() and it's set
unavailable. However, by this point an async resilver will
have already been requested if the DTL isn't empty.
	- This is fixed by cancelling the SPA_ASYNC_RESILVER
request immediately at the end of vdev_reopen() when a resilver
is unneeded.

Finally, added a testcase in ZTS for verification.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Dipak Ghosh <dipak.ghosh@hpe.com>
Signed-off-by: Akash B <akash-b@hpe.com>
Closes #14881
Closes #14892
2023-05-26 10:07:19 -07:00
..
avl AVL: Remove obsolete branching optimizations 2022-07-26 10:10:37 -07:00
icp Fix possible NULL pointer dereference in sha2_mac_init() 2022-12-01 12:39:42 -08:00
lua Lua: Fix bad bitshift in lua_strx2number() 2022-12-01 12:39:44 -08:00
nvpair Update `checkstyle` workflow env to ubuntu-20.04 2021-12-08 13:27:56 -08:00
os Linux: zfs_fillpage() should handle partial pages from end of file 2023-04-21 13:12:35 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Illumos #15286: do_composition() needs sign awareness 2023-01-19 12:50:42 -08:00
zcommon dsl_prop_known_index(): check for invalid prop 2022-11-08 10:16:21 -08:00
zfs Fix concurrent resilvers initiated at same time 2023-05-26 10:07:19 -07:00
zstd module: zstd: check we don't leak symbols; regenerate symbol map 2022-05-16 15:48:21 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-09-28 10:35:13 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd FreeBSD: Silence clang unused-but-set-variable 2022-06-15 11:27:28 -07:00
Makefile.in Add support for $KERNEL_{CC,LD,LLVM} variables 2022-02-16 17:58:55 -08:00