mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Illumos #1951: leaking a vdev when removing an l2cache device
1952 memory leak when adding a file-based l2arc device 1954 leak in ZFS from metaslab_group_create and zfs_ereport_checksum Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Matt Ahrens <matt@delphix.com> Reviewed by: Eric Schrock <eric.schrock@delphix.com> Reviewed by: Bill Pijewski <wdp@joyent.com> Reviewed by: Dan McDonald <danmcd@nexenta.com> Approved by: Eric Schrock <eric.schrock@delphix.com> References to Illumos issues: https://www.illumos.org/issues/1951 https://www.illumos.org/issues/1952 https://www.illumos.org/issues/1954 Ported-by: Richard Yao <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #650
This commit is contained in:
committed by
Brian Behlendorf
parent
b129c6590e
commit
5ffb9d1d05
+3
-1
@@ -492,7 +492,7 @@ vdev_alloc(spa_t *spa, vdev_t **vdp, nvlist_t *nv, vdev_t *parent, uint_t id,
|
||||
&vd->vdev_removing);
|
||||
}
|
||||
|
||||
if (parent && !parent->vdev_parent) {
|
||||
if (parent && !parent->vdev_parent && alloctype != VDEV_ALLOC_ATTACH) {
|
||||
ASSERT(alloctype == VDEV_ALLOC_LOAD ||
|
||||
alloctype == VDEV_ALLOC_ADD ||
|
||||
alloctype == VDEV_ALLOC_SPLIT ||
|
||||
@@ -669,6 +669,8 @@ vdev_top_transfer(vdev_t *svd, vdev_t *tvd)
|
||||
svd->vdev_ms_shift = 0;
|
||||
svd->vdev_ms_count = 0;
|
||||
|
||||
if (tvd->vdev_mg)
|
||||
ASSERT3P(tvd->vdev_mg, ==, svd->vdev_mg);
|
||||
tvd->vdev_mg = svd->vdev_mg;
|
||||
tvd->vdev_ms = svd->vdev_ms;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user