Project

General

Profile

Bug #1951

leaking a vdev when removing an l2cache device

Added by George Wilson over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Start date:
2012-01-05
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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.

History

#1

Updated by Albert Lee over 7 years ago

  • Project changed from site to illumos gate
#2

Updated by Eric Schrock over 7 years ago

  • Status changed from New to Resolved

changeset: 13574:d0fde6cacaac
tag: tip
user: George Wilson <>
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 <>
Reviewed by: Matt Ahrens <>
Reviewed by: Eric Schrock <>
Reviewed by: Bill Pijewski <>
Reviewed by: Dan McDonald <>
Approved by: Eric Schrock <>

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

Also available in: Atom PDF