]> git.proxmox.com Git - mirror_zfs.git/commit
Fix for metaslab_fastwrite_unmark() assert failure
authorTom Caputi <tcaputi@datto.com>
Fri, 22 Jul 2016 20:19:29 +0000 (16:19 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 25 Jul 2016 20:21:43 +0000 (13:21 -0700)
commit77943bc1dc39315feb335b0882dd6c91041538a3
tree58078debc89e622d0b6902e6a7c4f72ea87e35d0
parent20da056688ef9b41ed4c0a9ee9ff4cd36949c3d8
Fix for metaslab_fastwrite_unmark() assert failure

Currently there is an issue where metaslab_fastwrite_unmark() unmarks
fastwrites on vdev_t's that have never had fastwrites marked on them.
The 'fastwrite mark' is essentially a count of outstanding bytes that
will be written to a vdev and is used in syncing context. The problem
stems from the fact that the vdev_pending_fastwrite field is not being
transferred over when replacing a top-level vdev. As a result, the
metaslab is marked for fastwrite on the old vdev and unmarked on the
new one, which brings the fastwrite count below zero. This fix simply
assigns vdev_pending_fastwrite from the old vdev to the new one so
this count is not lost.

Signed-off-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4267
module/zfs/vdev.c