Page MenuHomeFreeBSD

Fix assertion when ZFS fails to open certain devices
ClosedPublic

Authored by asomers on Nov 27 2017, 10:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 24, 7:22 PM
Unknown Object (File)
Sat, Sep 13, 7:49 PM
Unknown Object (File)
Aug 8 2025, 12:29 PM
Unknown Object (File)
Jul 30 2025, 1:46 PM
Unknown Object (File)
Jul 27 2025, 6:24 AM
Unknown Object (File)
Jul 27 2025, 5:15 AM
Unknown Object (File)
Jul 26 2025, 10:23 AM
Unknown Object (File)
Jul 7 2025, 5:36 PM
Subscribers

Details

Summary

Fix assertion when ZFS fails to open certain devices

"panic: vdev_geom_close_locked: cp->private is NULL"
This panic will result if ZFS fails to open a device due to either of the
following reasons:

  1. The device's sector size is greater than 8KB.
  2. ZFS wants to open the device RW, but it can't be opened for writing.

The solution is to change the initialization order to ensure that the
assertion will be satisfied.

PR: 221066

Test Plan

The minimal test case as described by the PR, and the ZFS test
suite.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Nov 30 2017, 9:51 AM
This revision was automatically updated to reflect the committed changes.