diff options
author | Tom Caputi <[email protected]> | 2016-07-22 16:19:29 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-07-25 13:21:43 -0700 |
commit | 77943bc1dc39315feb335b0882dd6c91041538a3 (patch) | |
tree | 58078debc89e622d0b6902e6a7c4f72ea87e35d0 /module/zfs/vdev.c | |
parent | 20da056688ef9b41ed4c0a9ee9ff4cd36949c3d8 (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4267
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r-- | module/zfs/vdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index 5d5e3c5d1..302458b73 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -704,6 +704,7 @@ vdev_top_transfer(vdev_t *svd, vdev_t *tvd) ASSERT(tvd == tvd->vdev_top); + tvd->vdev_pending_fastwrite = svd->vdev_pending_fastwrite; tvd->vdev_ms_array = svd->vdev_ms_array; tvd->vdev_ms_shift = svd->vdev_ms_shift; tvd->vdev_ms_count = svd->vdev_ms_count; |