HomeFreeBSD

Fix file descriptor leak on pool import.

Description

Fix file descriptor leak on pool import.

Descriptor leak can be easily reproduced by doing:

  1. zpool import tank
  2. sysctl kern.openfiles
  3. zpool export tank; zpool import tank
  4. sysctl kern.openfiles

We were leaking four file descriptors on every import.

Similar leak most likely existed when using file-based VDEVs.

External-issue: https://reviews.freebsd.org/D43529
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #15630

Details

Provenance
pjdAuthored on Jan 23 2024, 11:03 PM
GitHub <noreply@github.com>Committed on Jan 23 2024, 11:03 PM
Parents
rG435b173fd972: ZTS: Apply zfs_bclone_enabled to bclone tests
Branches
Unknown
Tags
Unknown