]> granicus.if.org Git - zfs/commit
Fix ENXIO from spa_ld_verify_logs() in ztest
authorTom Caputi <tcaputi@datto.com>
Fri, 19 Oct 2018 22:10:23 +0000 (18:10 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 24 Oct 2018 21:37:33 +0000 (14:37 -0700)
commit7ab96299e5b961c7d4c29344927f2c59e914545e
treef0ed8f4dfc1ed1f0ea480d49def74f5b69f16445
parent4a7eb69a5ab0027a0f347a0cdd37b0275fcfecad
Fix ENXIO from spa_ld_verify_logs() in ztest

This patch fixes a small issue where the zil_check_log_chain()
code path would hit an EBUSY error. This would occur when
2 threads attempted to call metaslab_activate() at the same time.
In this case, the "loser" would receive an error code which should
have been ignored, but was instead floated to the caller. This
ended up resulting in an ENXIO being returned from from
spa_ld_verify_logs().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8010
module/zfs/metaslab.c