vdev_resilver_txg changes not persisted resulting in ASSERT panic
When a resilver completed vdev_resilver_txg is reset to 0 but its value is not persisted.
Due to this the following process results in an ASSERT panic:
panic: solaris assert: scn->scn_phys.scn_min_txg < vd->vdev_resilver_txg (0x936 < 0x8b2)
1. Added a vdev to a pool making it a mirror
2. Wait for resilvering to complete
3. Shutdown the machine
4. Physically detach the disk
5. Boot the machine
6. zpool online <pool> <device>
The attached patch fixes this issue.