]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Prevent unnecessary resilver restarts
authorjwpoduska <jpoduska@datto.com>
Wed, 27 Nov 2019 18:15:01 +0000 (13:15 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 27 Nov 2019 18:15:01 +0000 (10:15 -0800)
commit3c819a2c7da4560abb75b9dbf9a314ceafddaf86
tree665a9607adfe647d0336e7b9499c97da2d2d1dbf
parent894f6696b4cf7cc2562da159ba5e6e8c806f35de
Prevent unnecessary resilver restarts

If a device is participating in an active resilver, then it will have a
non-empty DTL. Operations like vdev_{open,reopen,probe}() can cause the
resilver to be restarted (or deferred to be restarted later), which is
unnecessary if the DTL is still covered by the current scan range. This
is similar to the logic in vdev_dtl_should_excise() where the DTL can
only be excised if it's max txg is in the resilvered range.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Gallagher <john.gallagher@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: John Poduska <jpoduska@datto.com>
Issue #840
Closes #9155
Closes #9378
Closes #9551
Closes #9588
14 files changed:
configure.ac
include/sys/dsl_scan.h
include/sys/spa.h
include/sys/vdev.h
module/zfs/dsl_scan.c
module/zfs/spa.c
module/zfs/vdev.c
tests/runfiles/common.run
tests/zfs-tests/tests/functional/Makefile.am
tests/zfs-tests/tests/functional/resilver/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/resilver/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/resilver/resilver.cfg [new file with mode: 0644]
tests/zfs-tests/tests/functional/resilver/resilver_restart_001.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/resilver/setup.ksh [new file with mode: 0755]