Bug #1951
closedleaking a vdev when removing an l2cache device
0%
Description
When removing a cache device, we reload the cache device list, dropping
the now unused devices. From spa_load_l2cache():
1221 /*
1222 * Purge vdevs that were dropped
1223 */
1224 for (i = 0; i < oldnvdevs; i++) {
1225 uint64_t pool;
1226
1227 vd = oldvdevs[i];
1228 if (vd != NULL) {
1229 if (spa_l2cache_exists(vd->vdev_guid, &pool) &&
1230 pool != 0ULL && l2arc_vdev_present(vd))
1231 l2arc_remove_vdev(vd);
1232 (void) vdev_close(vd);
1233 spa_l2cache_remove(vd);
1234 }
1235 }
We don't free the vdev here causing a leak, with accompanying
leaks of vdev_path, vdev_physpath and vdev_devid.
Updated by Albert Lee over 10 years ago
- Project changed from site to illumos gate
Updated by Eric Schrock over 10 years ago
- Status changed from New to Resolved
changeset: 13574:d0fde6cacaac
tag: tip
user: George Wilson <george.wilson@delphix.com>
date: Mon Jan 23 19:46:52 2012 -0800
description:
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>
modified:
usr/src/uts/common/fs/zfs/spa.c
usr/src/uts/common/fs/zfs/sys/vdev_impl.h
usr/src/uts/common/fs/zfs/vdev.c
usr/src/uts/common/fs/zfs/zfs_fm.c