]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
zfs: fix vdev_rebuild_thread deadlock
authorMartin Matuska <mm@FreeBSD.org>
Wed, 3 Mar 2021 01:28:56 +0000 (02:28 +0100)
committerMartin Matuska <mm@FreeBSD.org>
Sat, 6 Mar 2021 20:23:22 +0000 (21:23 +0100)
commite33a2b2905a886e98ab4b8f8d83ed30f6d8bb254
tree1d66e4ba3a9f25368afaddc1cf3ae841fa3f1914
parent2fa2d50ead44d148482a05284f5c3524475c8e6e
zfs: fix vdev_rebuild_thread deadlock

From the openzfs 8e43fa12c commit message:
  The metaslab_disable() call may block waiting for a txg sync.
  Therefore it's important that vdev_rebuild_thread release the
  SCL_CONFIG read lock it is holding before this call.  Failure
  to do so can result in the txg_sync thread getting blocked
  waiting for this lock which results in a deadlock.

Obtained from: openzfs/zfs@8e43fa12c571878f32119122771888ab9092a75a
Approved by: re (delphij)

(cherry picked from commit c7069063144395b025c0ef178431eb2cafdbe1ca)
sys/contrib/openzfs/module/zfs/vdev_rebuild.c